Train corridor scheduling process including a balanced feasible schedule cost function

ABSTRACT

A process for scheduling the travel of trains on a rail corridor. The rail corridor includes a plurality of siding tracks onto which trains can be sided when a meet or pass occurs with another train on the corridor. A gradient search process is used with a cost function to determine the optimum schedule by moving each meet and pass to a siding. The individual train schedules are varied by changing train speed and/or the train departure time (i.e., the time at which the train enters the corridor).

FIELD OF THE INVENTION

This invention relates to a process for scheduling the movement oftrains over a rail corridor having a plurality of sidings or paralleltracks with crossover switches.

BACKGROUND OF THE INVENTION

A rail corridor is a collection of tracks and sidings connecting tworail terminal areas. An example of a rail corridor 8 is shown in FIG. 1,showing a single main track 10 and three sidings 20. The western end ofthe rail corridor is on the left side of FIG. 1 and the eastern end onthe right.

Scheduling rail transportation on a rail corridor is particularlycomplex as compared to highway, water, or air transportation. Trainsusing a single track traveling in opposite directions (i.e., a meet) ortrains traveling in the same direction (i.e., a pass) must meet in thevicinity of a siding so that one train can be sided to let the otherpass. Alternatively, if there exists a double main line with crossoverswitches, one train can be switched to the second main line to allow theother train to pass. Also, when such meets or passes occur at a siding,the siding chosen must be long enough to accommodate the train to besided, and the train to be sided must arrive at the siding and havesufficient time to pull onto the siding before the passing train arrivesat the siding.

The railroad must earn revenue from its transportation operations, andsome of this revenue is generally at risk if trains cannot deliverfreight on time. The destination time of the trains must be managedinsofar as possible to prevent late penalties incurred by the railroad.Therefore scheduling trains across a rail corridor involves arrangingmeets and passes as required for all trains, and while also meeting theschedule for each train so that they all arrive, on time, at the end ofthe corridor.

Commercially applied scheduling processes attempted to date have beenbased on paradigms which involve simulation with branch and boundtechniques to find a conflict-free schedule. Since a branch and boundprocess must sort through many binary choices as it proceeds toward asolution, these techniques are slow, and do not take advantage ofquantitative relationships that can be adduced from the schedulingcontext.

Additionally, the prior art technique search processes actually becomemore complex and take longer to arrive at a solution as the number ofsidings in the rail corridor increases. This is due to the searchalgorithms that form the basis for these prior art techniques. Moresidings requires the search algorithm to search through and considermore choices before arriving at an optimum solution. As will be shownbelow, the technique of the present invention overcomes thisdisadvantage. Since the present invention calculates a cost functionwhere each siding represents a lower cost, having more sidings will makeit easier for the algorithm to identify the optimal (i.e. minimal) cost.

One prior art technique uses quantitative information such as trainspeed, destination, and time of departure as discrete variables in anartificial intelligence based system. The artificial intelligenceprocess involves rules that are used to search through the trial casesuntil the best case is found. In addition to the considerable time takenby an artificial intelligence system to optimize a solution, it is alsoknown that a slight change to the initial conditions may produce asignificantly different result. In any case, a slight change to theinitial conditions will require a new and lengthy computation to findthe optimum solution. A commercial product referred to as The MovementPlanner, offered by GE-Harris Railway Electronics L.L.C. of Melbourne,Fla., implements such an artificial intelligence solution.

As can be seen, the total set of parameters for scheduling a corridorcan be large, and of both discrete and continuous types. Generally, acost function based on these parameters can be formulated, and then somemethod of search is executed that will reduce the cost and/or find afeasible schedule for the subject trains. But, the presence of discretevariables in the search space prevents or greatly complicates theapplication of any “hill-climbing” search processes based on the use ofgradients

SUMMARY OF THE INVENTION

Cost functions that are everywhere differentiable have the advantageover prior art artificial intelligence solutions of being amenable togradient-based minimization algorithms that do not have to accommodatethe difficulties that arise in discrete or partially discrete searchspaces. The present invention is a process whereby a rail corridor andthe train schedule along that corridor can be characterized by adifferentiable (i.e., continuous) cost function, so that a searchprocess based on differentiation may be applied to scheduling trainactivity in the corridor.

The present invention is an analytical process for scheduling trainsacross a corridor that is driven by a cost function to be minimized,where the cost function is a continuous and differentiable function ofthe scheduling variables. The present invention is an improvement overthe prior art cost functions that include discrete variables and thusare not differentiable everywhere. The present invention will permit theuse of search processes relying on gradients, and as such, will convergeto solutions much more quickly than the prior art scheduling processesinvolving simulation, or searching through discrete options.

The corridor scheduling process of the present invention involves threesteps for identification of the optimum schedule. After an acceptabledifferentiable cost function is derived, the first step is the gradientsearch process wherein the gradient of the differentiable cost functionis determined. The cost function is a sum of individual localizerfunctions. For each pair of trains in the corridor that might intersect,using the localizer function, the intersection point is identified ashaving a high value if the train trajectories do not intersect near asiding and lower values as the intersection point moves toward anysiding. The gradient process may not move all intersection pointsprecisely to the center of sidings dependent upon the selected thresholdvalue and parametric values of the localizer function. Instead, thegradient process varies train departure times so that the set of allintersection points of trains are moved nearer to sidings. The secondphase of the process simply moves the points precisely to the centers ofsidings, selects which train to side, and computes exact arrival anddeparture times for the trains at the siding to assure the physicalintegrity of the meet. In order to center the intersection points atsidings and side specific trains, the speeds of the individual trainsmust be modified. This is accomplished during the second step of thescheduling process.

The third step maintains the proper siding relationships between any twomeeting trains, as determined in step two, but allows the meet time tovary in an effort to assure that no train exceeds an upper speed limit.This final phase is again a gradient search process applied to all ofthe meet points determined in the second step.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention can be more easily understood, and the furtheradvantages and uses thereof more readily apparent, when considered inview of the description of the preferred embodiments and the followingfigures. Identical reference characters in the figures refer toidentical components of the invention.

FIG. 1 illustrates of a simple rail corridor;

FIG. 2 is a string diagram illustrating the corridor scheduling problemin terms of intersecting lines;

FIG. 3 is a flow chart for the corridor scheduling process of thepresent invention;

FIG. 4 illustrates the basic geometry of train trajectories;

FIG. 5 is a graph of the basic sigmoid function;

FIG. 6 illustrates the use of sigmoid sums to discriminate an interval;

FIG. 7 illustrates the construction of a localizer function from sigmoidfunctions;

FIG. 8 illustrates an example of a localizer function for two sidings;

FIGS. 9A and 9B show the modification of a localizer function to accountfor corridor endpoints;

FIG. 10 illustrates the necessary geometry to achieve a balancedlocalizer function;

FIGS. 11A, 11B, and 11C illustrate a technique for approximating theeconomic penalty function;

FIG. 12 shows a penalty term function for early departure of a train;

FIG. 13 is an initial infeasible string graph schedule for twelvetrains;

FIG. 14 is a string graph for trains of FIG. 13 after a gradient searchof the present invention;

FIG. 15 shows the process whereby intersection points are moved to asiding center;

FIG. 16 shows moving the first intersection point to a siding center;

FIG. 17 illustrates the process of speed adjustments to center allmeets;

FIGS. 18A and 18B through FIGS. 24A and 24B illustrate certaininfeasibilities created by centering meets on sidings and the resolutionthereof;

FIGS. 19A and 19B illustrates the two types of siding conflict;

FIGS. 20A and 20B illustrate the resolution of certain siding conflicts;

FIGS. 21A and 21B illustrate the “unresolvable” siding conflict;

FIGS. 22A through 22D illustrate resolution of both types of sidingconflicts;

FIGS. 23A through 23E show the cases for downward resolvable sidingconflicts;

FIGS. 24A and 24B show the resolution of upward-resolvable sidingconflicts;

FIG. 25 illustrates train trajectories represented as broken linesegments;

FIG. 26 is an evaluation of the train trajectory vector;

FIG. 27 shows an adjustment of train trajectory to accommodate sidingdelays;

FIG. 28 shows siding details for a westbound sided train;

FIG. 29 illustrates siding details for eastbound passing trains;

FIG. 30 is a complete string graph adjusted for centered meets and trainsidings; and

FIGS. 31 and 32 are flow charts illustrating algorithms implemented bythe present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Before describing in detail the train corridor scheduling process inaccordance with the present invention, it should be observed that thepresent invention resides primarily in a novel scheduling processalgorithm and not in the particular detailed configurations thereof.

The traditional method of graphic depiction of a train schedule for arail corridor is referred to as a string graph as shown in FIG. 2. Thisstring graph represents a time-distance graph of train movement in thecorridor depicted in FIG. 1. The horizontal axis represents time, (i.e.,a fixed window of time) and the vertical axis represents distance, withthe point at the origin of the graph being the western end of thecorridor, and the point at the top being the eastern end of thecorridor. The width of the graph represents the period of interest inwhich the trains will be scheduled. Lines on the graph sloping one wayrepresent traffic in one direction across the corridor, while linesslopping in the opposite direction represent oppositely-directedtraffic. Only the position of the engine is shown. The horizontal barsacross the graph, bearing reference to character 20, correspond to thesiding locations.

The invention as presented herein is described in conjunction with asingle-rail corridor with sidings. But those skilled in the art willrecognize that it can be easily extended to multiple track main lineswith cross-over switches between the main lines.

The essential criterion for an acceptable schedule, as expressed interms of the string graph of FIG. 2, is that any two train trajectories(lines) on the graph must intersect at a siding 20. If their meets areat sidings, then in addition, a choice has to be made as to which trainto side.

Note that, unless all of the intersecting lines actually intersectwithin the sidings 20, the schedule is infeasible. Assuming, for thenonce, that all train speeds will be fixed, the departure times for thetrains can be adjusted in order to move the train lines about andattempt to place all intersection points over the sidings 20. In anotherembodiment of the present invention, it would be possible, as well, tovary train speeds, which would change the slopes of the train trajectorylines, in order to place intersection points over the sidings 20. In yetanother embodiment, both speeds and departure times can be variedsimultaneously to find a feasible meet/pass plan for the trains.

The process to be described herein treats the corridor schedulingproblem as a geometry problem, rather than directly as a schedulingproblem, as suggested by the prior art. It does so by providing amechanism by which train trajectory lines are moved under control of agradient-search process based on a differentiable cost function in amanner that moves the intersection points to or close to establishedsidings.

The search process of the present invention permits variation of speedsand departure times, separately or jointly, and will use an everywheredifferentiable cost function that takes on lower values as the scheduleapproaches feasibility. Because the cost function is everywheredifferentiable, an iterative, gradient-search method can be applied thatassures that the successive schedules found by the search process infact converge to a conflict-free result.

Moreover, it is possible to include, in another embodiment of thepresent invention, the constraint that a siding must be longer than atrain to be sided on it. It is further possible to include, in yetanother embodiment, the economic costs incurred by adjusting trainschedules. In other embodiments, constraints on maximum train speed andthe early departure of trains can also be considered.

It will be appreciated by those skilled in the art that although FIG. 2illustrates a situation with three sidings and three trains traveling ineach direction, the technique of the present invention can be easilyextended to any number of trains operating in each direction and anynumber of sidings on the rail corridor. The concepts of the presentinvention can also be extended to a rail corridor with more than onemain line and crossover switches between the main line tracks. Thepresent invention can be applied to any rail corridor where one traincan be switched to another track when a meet or pass with another trainoccurs.

The scheduling of trains must first be feasible, but in addition, theremay be choices as to which trains to side or the order to run trains,which helps to assure that economic penalties will not be incurred or,failing that, will at least be ameliorated.

Process 30 for obtaining both schedule feasibility and economicacceptability may consist of a number of steps as shown in FIG. 3.First, at step 31, an initial prearrangement of the trains is done,establishing their order of entry into the corridor. At this point, thetrain order is based solely on due times, (represented as an input tostep 31 from block 32) with no analysis as to the corridor capacity orspecific departure times. At step 33, an initial schedule for the trainsis determined; there are several numerical optimization techniques thatmay be applied here. See for example, Numerical Optimization by JorgeNacedad and Stephen J. Wright; Springer, New York 1999; ISBN0-387-98793-2.

This initial schedule is input to the gradient search process, step 34,to be discussed below, which minimizes schedule infeasibility. Inanother embodiment the gradient search process can also minimizeeconomic penalties incurred by the railroad for the late arrival oftrains and give due consideration to maximum train speeds, earlydeparture times and siding lengths. The gradient search adjusts traindeparture times (i.e., the time the train enters the corridor) and/orspeeds so that meets occur near sidings. The process 30 loops throughsiding choice step 38 and the conflicts decision step 36 until all trainintersections are placed at or near sidings on the rail corridor byadjusting the speed and/or departure time (i.e., the time the trainenters the corridor) of the trains traversing the corridor.

The decisions made at step 38 as to which train to side for each pair oftrains meeting at a siding may be driven by considerations of relativeeconomic cost due to the delays created by siding one train versusanother train. This siding decision process represents anotherembodiment of the present invention and will be discussed further below.

Once the siding decisions are made, some of the trajectories (those forsided trains) on the string graph (FIG. 2) will become broken lines,(representing infeasible meets) which may cause new scheduleinfeasibilities for some train trajectories. At this point, the gradientsearch can again be applied, but only to the subset of subtrajectoriesthat have been driven into infeasible meets. Multiple passes through thegradient search step 34 and siding decision process step 38 should bringthe schedule to complete feasibility.

FIG. 4 characterizes the train trajectories as lines based on theinitial departure times (moment of entry into the corridor) and thetrain speed. In FIG. 4, the bottom of the vertical axis represents thewest end of the corridor, and the positive direction along that axiscorresponds to eastbound travel. The time window of interest for travelin the corridor begins at time d₀, and the length of the corridor isdenoted by L.

FIG. 4 focuses on characterizing one eastbound train and one westboundtrain, respectively T_(i) and T_(j), with corresponding trajectorieslabeled L_(i) and L_(j). s_(i), s_(j) denote the speeds and d_(i), d_(j)denote the departure times of the trains T_(i) and T_(j) respectively.The departure time of a train is the time at which it enters thecorridor: for an eastbound train, that corresponds to a point situatedon the horizontal axis of FIG. 4, (i.e., t=0) and for a westbound train,that corresponds to a point located on the horizontal line y=L.

Then for train trajectory L_(i) (eastbound), we may express therelationship between coordinates for any point on the line in the form$\begin{matrix}{{{\frac{y - 0}{t - d_{i}} = s_{i}},{or}}{y = {{s_{i}t} - {s_{i}{d_{i}.}}}}} & \text{(3-1)}\end{matrix}$

For train T_(j) (westbound), the form of trajectory L_(j) can belikewise expressed as $\begin{matrix}{{{\frac{y - L}{t - d_{j}} = {- s_{j}}},{or}}{y = {{{- s_{j}}t} + {s_{j}d_{j}} + {L.}}}} & \text{(3-2)}\end{matrix}$

We can write equations of identical form for both eastbound andwestbound trains by writing

y=s _(i) t−s _(i) d _(i)+θ_(i) L,   (3-3)

where the speed of westbound trains by convention will be the negativeof the train's actual speed, and $\begin{matrix}{\theta_{i} = \left\{ {\begin{matrix}0 & {{if}\quad {train}\quad T_{i}\quad {is}\quad {eastbound}} \\1 & {{if}\quad {train}\quad T_{i}\quad {is}\quad {westbound}}\end{matrix}.} \right.} & \text{(3-4)}\end{matrix}$

This form of a linear equation (3-3) is not the usual form directly interms of slope and intercept, but in this analysis train speeds anddeparture times will be varied and the form of Equation 3-3 has theadvantage of expressing the train trajectories explicitly in terms ofspeeds and departure times.

The objective of the present invention is to determine the coordinatesof intersection points (t_(ij), y_(ij)) for pairs of train trajectories,and move these intersection points to sidings. For trains T_(i) andT_(j), the solution for the trajectory intersection point is (t_(ij),y_(ij)), where $\begin{matrix}{{t_{ij} = \frac{{s_{i}d_{i}} - {s_{j}d_{j}} + {\left( {\theta_{j} - \theta_{i}} \right)L}}{s_{i} - s_{j}}},{and}} & \text{(3-5)} \\{y_{ij} = {\frac{{s_{i}{s_{j}\left( {d_{i} - d_{j}} \right)}} + {\left( {{s_{i}\theta_{j}} - {s_{j}\theta_{i}}} \right)L}}{s_{i} - s_{j}}.}} & \text{(3-6)}\end{matrix}$

(t_(ij), y_(ij)) is derived by equating equation (3-1) and (3-2) (aftermaking the notation change suggested by equation (3-3)).

This characterization of the intersection point applies to intersectionsof like- directed or oppositely-directed trains, so that the analysis tobe developed concerning intersection points will adjust traintrajectories involving both meets and passes.

To this point the train scheduling problem has been abstracted to acontext of moving intersecting lines about until all intersection pointsare within certain ranges (the siding bars 20 in FIG. 2). When allintersection points that are within the rectangle (representing thecorridor 8) are also within the sidings 20, we have obtained a feasibleschedule.

It is an objective to obtain a feasible schedule using a search processthat minimizes a cost function, and in the preferred embodiment, thepreferred cost function will have a high value if any intersection pointis outside a siding bar, and a low value if and only if all intersectionpoints are within the siding bars. Intersection points entirely outsidethe graph are not considered; the corridor and scheduling period areconsidered to be co-extensive with the graph.

Let a function of a single y_(ij) with this cost function property be alocalizer function, and construct such a localizer function using thesigmoid function as a basis. The preferred function will depend on thebasic sigmoid function, which has the equation $\begin{matrix}{{{\sigma \left( {{x;\alpha},\beta} \right)} = \frac{\beta}{1 + ^{{- \alpha}\quad x}}},} & \text{(4-1)}\end{matrix}$

and has a graph of the form shown in FIG. 5.

The parameter β of the sigmoid function determines a horizontalasymptote for the curve, and the parameter α determines how sharply thefunction rises as it crosses the y-axis. As α approaches infinity, thesigmoid curve approaches a step function. In the preferred embodimentβ=1.0 and α=0.5.

Because the sigmoid function can transition sharply from a low to a highvalue, it is a good continuous approximation of discrete processes. Sumsof sigmoids can also be used to determine whether or not a variable hasa value in an interval. Specifically, for the interval [a, b], definethe function

D(x;a,b) =σ(x−a; α,β)−σ(x−b;α,β).  (4-2)

Based on the graph of the sigmoid as depicted in FIG. 5, the graph ofD(x; a, b) takes the form shown in FIG. 6, which shows the function D(x;a, b) (reference character 60) derived as a sum of two sigmoid functions62 and 64.

Since each of the sigmoids 62 and 64 could be made to approximate a stepfunction as closely as desired, the function D(x; a, b) can be definedto very sharply discriminate when x is in the interval [a, b], and canbe made to approach a pulse of width b−a as closely as desired.

Also, since the function D(x; a, b) (reference character 60) approacheszero as x becomes more distant from the interval [a, b], it is possibleto sum such interval discriminators (for non-overlapping intervals) andthereby obtain a function which takes a high value when x is in any ofthe intervals of interest, but is low otherwise. This is shown in FIG. 7for the two intervals [a₁, b₁] and [a₂, b₂], and it is obvious to thoseskilled in the art that the construction is generalizable to any finitenumber of intervals.

The localizer function 70 shown in FIG. 7 (generated by summing sigmoidfunctions 72, 74, 76, and 78) can be extended to any finite number ofintervals, so such a localizer can be constructed for any corridor ofthe type in FIG. 1 (one main track, one or more sidings). The sidingsare represented along the x-axis between points ai and bi.

The localizer function 70 has the form $\begin{matrix}{{L^{\prime}\left( {{x;\alpha},\beta,a_{1},b_{1},a_{2},b_{2}} \right)} = \quad {\beta - {\sum\limits_{i = 1}^{2}{\sigma \left( {{{x - a_{i}};\alpha},\beta} \right)}} +}} \\{\quad {\sum\limits_{i = 1}^{2}{\sigma \left( {{x - b_{i}},\alpha,\beta} \right)}}}\end{matrix}$

The cost function for the scheduling problem of FIG. 2 will be derivedbelow using the localizer function concept, and assuming n_(S) sidings.In the preferred embodiment, the cost function will be low if and onlyif the y-coordinate y_(ij) for an intersection of train trajectorieslies within the range of a siding, but the localizer function 70 of FIG.7 in fact displays the opposite effect. Thus we will first define thelocalizer function $\begin{matrix}\begin{matrix}{{L^{\prime}\left( {{x;\alpha},\beta,a_{1},b_{1},\ldots \quad,a_{n_{S}},b_{n_{S}}} \right)} = \quad {\beta - {\sum\limits_{i = 1}^{n_{S}}{\sigma \left( {{{x - a_{i}};\alpha},\beta} \right)}} +}} \\{\quad {{\sum\limits_{i = 1}^{n_{S}}{\sigma \left( {{{x - b_{i}};\alpha},\beta} \right)}},}}\end{matrix} & \text{(4-3)}\end{matrix}$

which has the desired property of taking a low value if and only if x isin one of the intervals

[a₁,b₁], . . . [a_(n) _(S) ,b_(n) _(S) ],

and a high value otherwise. That is, Equation 4-3 defines a localizerfunction that is the inverse of the localizer function 70. See thelocalizer function 80 in FIG. 8.

The localizer function as defined above in Equation 4-3 (and taking theform of the inverse of the localizer function 70 in FIG. 7) will now beused to define a cost function which takes lower values as theintersection points of train trajectories are moved toward sidings. Twoversions of the cost function are described separately below.

A Simplified Feasible-Schedule Cost Function

Now letting n_(T) be the set of all trains to be run in the corridor,and letting L_(i) represent the train trajectory line for train T_(i)(as in FIG. 2). Define a set I of all possible y-coordinates of theintersection points between the train trajectories by

I={y _(ij) /{y _(ij) }=L _(i) ∩L _(j)&i,j ε{1, . . . , n _(T)}}.  (5-1)

Note that, with reference to FIG. 2, this set includes all possibleintersection points between train trajectories, even though some ofthose points may not be within the corridor 8 and/or time window ofinterest. It is necessary to consider such out-of-corridor intersectionpoints because the search process will move the train trajectories, andmay bring into the corridor 8 an intersection point that initially wasoutside the corridor 8.

To create a cost function that takes on a low value if and only if allintersection points lie within one of the sidings 20, we sum localizerfunction values derived from Equation 4-3. Specifically define thevector that represents all intersection points in the vicinity of$\begin{matrix}{{\overset{\rightarrow}{y} = \left( {{y_{ij}/y_{ij}} \in I} \right)},} & \text{(5-2)}\end{matrix}$

and define the cost function C′({right arrow over (y)})by$\begin{matrix}{{C^{\prime}\left( \overset{\rightarrow}{y} \right)} = {\sum\limits_{y_{ij} \in I}{{L^{\prime}\left( {{y_{ij};\alpha},\beta,a_{1},b_{1},\ldots \quad,a_{n_{S}},b_{n_{S}}} \right)}.}}} & \text{(5-3)}\end{matrix}$

The cost function is a multidimensional function of the vector y, whereeach value of the vector yields a different sum based on localizerfunction values. Each localizer function value comprising the sumindicates whether an intersection point is in a feasible range (thesiding bars 20 of FIG. 2) or not. See the cost function 80 of FIG. 8,where the x-axis represents distance along the corridor. If all of theintersection points relative to a specific siding are feasible,C′({right arrow over (y)}) should take a low value in the vicinity ofpoints represented by that siding; otherwise, it takes a value near thevalue of β. When many intersection points are involved, β may have to bechosen so that the near-zero sums of a large number of feasibleintersection points do not result in a value in the range of β, whichwould mask the feasibility that is to be discriminated by the function.

C′({right arrow over (y)}) is a differentiable function of the vector{right arrow over (y)} (the intersection points) and therefore in eachof the variables that determine the various intersection points, i.e.,departure times and/or speeds of the trains. Therefore the cost functioncan be used with gradient search technique or other search techniquesbased on partial derivatives, to minimize the cost function value atsidings. One such technique will be discussed below. Since eachintersection point occurring as a component of {right arrow over (y)} isa function of the train departure times and the speeds of thecorresponding trains, we may treat the cost function as one which may beoptimized by adjusting either speeds or origination times of the trains,or both.

Accounting for Corridor Endpoints

The fact that the intersection points in I may not always representintersections of trajectories within the corridor 8 poses a difficultyfor the cost function as defined in Equation 5-3, which is that anyintersection point outside the corridor is a “don't care” point for thesearch process (so long as it remains outside the corridor), but thecost function as defined in Equation 5-3 will assign a high value tosuch a point. Recall that the cost function of Equation 5-3 is based onthe localizer function of Equation 4-3, which is illustrated byreference character 90 in FIG. 9A. Thus as Equation 5-3 is currentlyformulated, an otherwise feasible solution might be masked by such a“don't care” point.

In another embodiment of the present invention, the solution involvesmodifying the localizer function 90. FIG. 9A depicts the localizerfunction 90, as defined by Equation 4-3, and a modified localizerfunction 92, which is generated by adding two more sigmoid functions 94and 96 to account for the end points of the corridor 8.

Specifically, define

e=y-coordinate of the eastern end of the corridor 8,

 w=y-coordinate of the western end of the corridor 8,   (5-4)

then alter the definition of the localizer function by including thesigmoid functions 74 and 96 as follows.

L(x;α,β,a ₁,b₁, . . . a_(n) _(S) ,b _(n) _(S) ,e,w)=L′(x;α,β, a ₁ ,b ₁ ,. . . a _(n) _(S) ,b _(n) _(S) )−σ(w−x;α,β)−σ(x−-e; α,β).  (5-5)

The use of the localizer function L of Equation 5-5 also requiresrewriting of the cost function in Equation 5-3, as follows.$\begin{matrix}{{C\left( \overset{\rightarrow}{y} \right)} = {\sum\limits_{y_{ij} \in I}{{L\left( {{y_{ij};\alpha},\beta,a_{1},b_{1},\ldots \quad,a_{n_{S}},b_{n_{S}},e,w} \right)}.}}} & \text{(5-6)}\end{matrix}$

This cost function then should take a high value so long as any traintrajectory intersection point within the corridor is infeasible, but hasa low value for all feasible intersection points, as well asintersection points that fall outside of the corridor.

Like C′({right arrow over (y)}), C({right arrow over (y)}) is adifferentiable function in each component of the vector ({right arrowover (y)}). Any Gradient search techniques or the use of otherinformation based on partial derivatives, can be used to minimize thevalue of C({right arrow over (y)}) in the regions of the sidings.

A Balanced Feasible-Schedule Cost Function

As can be seen from the localizer functions 70, 90, or 92, the sidings(as represented by the x-axis values a_(I) to b_(I)) are shown as beingof different lengths. In fact, rail corridors typically have sidings ofdifferent lengths. The consequence of different length sidings, withrespect to the cost function (see Equation (5-6)) is that the costfunction minima corresponding to sidings do not have the same y value.See the cost function 80 of FIG. 8. For siding Si, the cost function yvalue is represented by reference character 82 and the y value forsiding S2 is represented by reference character 84. Note that theminimum at reference character 82 has a larger value than the minimum atreference character 84. Because the sidings are different lengths, thesigmoid sum that is creating the minimum uses a narrower portion of thesigmoid function for narrower sidings and, therefore, the associatedminimum does not drop down as far as for a wider siding. This effect maycause the cost function gradient optimization process to favor a longsiding with a deeper minimum when it is located very close to a shortsiding with a shallow minimum. In the embodiment discussed below, thecost function will be adjusted to achieve equal minima for all sidings.

If the derivative of the localizer function 80 has a zero exactly at themidpoint between sidings, then the search process will have no tendencyto favor one siding over another. We will call such a localizer functionbalanced. The situation depicted in FIG. 8 does not assure that the costfunction derivative will have a zero properly situated;

although the derivative may appear to be zero between the sidings, itcan be shown by those skilled in the art, through equation manipulation,that the zero is usually off-center. FIG. 10 illustrates a means toachieve a close approximation to a balanced cost function. In FIG. 10,the intervals [a₁, b₁], [a₂, b₂], and [a₃, b₃] represent locations ofsidings along the main corridor. We would like to assure that thederivative of the localizer function, as defined for this corridor, willbe zero at the midpoints m₁₂, and m₂₃ between sidings. The localizerfunction generating the cost function is a sum of sigmoids, each ofwhich contributes substantially only within the immediate vicinity ofthe sidings for which it creates a minimum in the localizer function. Ifwe assume that the localizer function at point m,₂ does not dependsignificantly on the sigmoid terms other than those used to createminima for the two immediately surrounding sidings, then we may write asimplified localizer in the form

{tilde over (L)}(x;a ₁ ,b ₁ ,a ₂ ,b ₂)=β−σ(x−b ₁;α,β)+σ(x−a ₁;α,β)−σ(x−b₂;α,β)+σ(x−a ₂;α,β).   (5-7)

Note here that the sigmoid functions used to generate the localizerfunction are only those sigmoid functions representing sidings to theleft and right of the point of interest on the localizer function.

It can be shown by computation that${{\frac{\partial}{\partial x}\left( {\overset{\sim}{L}\left( {{x;a_{1}},b_{1},a_{2},b_{2}} \right)} \right)}}_{x - m_{12}} = 0$

provided that

m ₁₂ −b ₁ =a ₂ −m ₁₂ & m ₁₂ −a ₁ =b ₂ −m ₁₂,

as is shown in FIG. 10. This requirement will force both sidings to beof the same length, of course, and additionally, the next sidingcorresponding to the interval [a₃, b₃] must then be the same length asthe siding corresponding to interval [a₂, b₂]. It follows by inductionthat all sidings along the corridor must have equal lengths for thelocalizer function for the corridor to be balanced.

Bringing such an artifact to bear would have two effects:

(1) the search might, at least slightly, mislocate intersection points,since the exact position of the sidings would not be reflected in themodel;

(2) siding lengths would not be accurately represented relative to trainlengths.

Of these two drawbacks, the latter is in fact of no consequence, becausethe modification to the localizer function to account for siding lengthswill not affect the subsequent step of the present invention (to bediscussed below) wherein train lengths are considered relative to sidinglengths. The former effect will be of minor consequence, since gettingtrain intersection points nearly into the vicinity of sidings will allowminor adjustments to train speed to ensure intersections occur atsidings. This step of the present invention will also be discussedfurther below.

In another embodiment especially favorable if there is a largediscrepancy between the shortest and longest siding, begin with allsidings assumed equal, thereby preventing bias among sidings in theearly part of the search, and then adjust the localizer slowly backtoward correct siding lengths as the search process iterates.Specifically, this may be implemented in another embodiment of thepresent invention as follows. Before the search process begins,

(1) compute the average siding length S_(avg) as $\begin{matrix}{{s_{avg} = \frac{\sum\limits_{i = 1}^{n_{s}}\left( {b_{i} - a_{i}} \right)}{n_{s}}};} & \text{(5-8)}\end{matrix}$

(2) redefine the position of each siding S_(i) (corresponding tocorridor interval [a_(i), b_(i)]) as corresponding to the interval[a′_(i)(0), b′_(i)(0)], where $\begin{matrix}{{a_{i}^{\prime} = \frac{a_{i} + b_{i} - s_{avg}}{2}},{{{{and}\quad b_{i}^{\prime}} = \frac{a_{i} + b_{i} + s_{avg}}{2}};}} & \text{(5-9)}\end{matrix}$

(3) define, for any integer n>0,

a′ _(i)(n)=a′_(i) e ^(−λn) +a _(i)(1−e ^(−λn)) and b′ _(i)(n)=b′_(i) e^(−λn) +b _(i)(1−e ^(−λn)),  (5-10)

where λ is a positive real number. Note then that${{a_{i}^{\prime}(0)} = {{a_{i}^{\prime}\quad {and}\quad {\lim\limits_{n\rightarrow\infty}{a_{i}^{\prime}(n)}}} = a_{i}}},{and}$${b_{i}^{\prime}(0)} = {{b_{i}^{\prime}\quad {and}\quad {\lim\limits_{n\rightarrow\infty}{b_{i}^{\prime}(n)}}} = {b_{i}.}}$

Begin the process by letting n=0 and then as the search proceeds,increase n according to some scheme.

For example, one preferred scheme would be to note when successivevalues of the cost function (during the gradient search process asdiscussed below) have a difference smaller than a predeterminedthreshold (see for example, the threshold value ε referred to inconjunction with Equation 8-3 and the textual material followingimmediately thereafter), then begin to increase n (relative to thedifferences in siding lengths) and recompute the localizer functionuntil siding lengths are within 5% of being accurate. This will permitthe initial localizer to correspond to the balanced localizer, so thatsidings will not tend to be favored solely by length. The initial “push”of intersections toward one or another siding will be unbalanced. As nincreases, the localizer function will more accurately reflect the truecorridor structure, so that eventually an accurate schedule is obtained.

Accounting for Train Lengths versus Siding Lengths

The cost function as described above permits a search for a feasibleschedule only insofar that trains will meet in the vicinity of sidings.No reference has been made to the lengths of the trains relative to thesidings, and if two trains have a “feasible” meet at a siding that willhold neither of them, then the situation is not actually feasible. Thereare other reasons that trains may not use a siding, related to grade,transportation of hazardous materials, etc., so the following analysisto block the use of a siding by a given train refers to more situationsthan just train length versus siding length.

The cost function of Equation 5-6 will not prevent such an infeasibilityfrom occurring, but in another embodiment, a simple modification of thelocalizer functions (Equation 5-5) on which the cost function is basedwill suffice to prevent such infeasibilities.

In particular, the cost function contains a term for each possible traintrajectory intersection point. In the previous embodiment all such termsare of exactly the same form. Now suppose that we define the localizerfunctions to be specific to each possible intersection point of traintrajectories, as follows. In this case, we generalize from the contextof FIG. 2, and assume a total of n_(S) sidings S₁, . . . , S_(n) _(S)along the corridor, and n_(T) trains T₁, . . . , T_(n). We need thefollowing notation:

let

H ₁=the length of siding S _(i)(i=1, . . . n _(S)),  (6-1)

and let

M _(i)=the length of train T _(i)(i=1, . . . , n _(T)).  (6-2)

For any two trains T_(i) and T_(j), define the following set of sidingsfrom amongst all sidings in the corridor:

S _(ij) ={S _(k) /kε{1 . . . , N}& ((M _(i) ≦H _(k))(M _(j) ≦H_(k)))}.  (6-3)

S_(ij) is the subset of sidings along the corridor on which at least oneof the two trains T_(i) and T_(i) can be sided. Now, if the localizerfunction for the intersection point of the train trajectories of T_(i)and T_(j) does not include the sigmoid terms (see Equation 5-7)corresponding to sidings not in S_(ij), then it will remain high eventhough y_(ij) is within a siding, but the siding is too short for eithertrain. In this way, accounting for siding versus train length actuallyreduces the computational complexity of the cost function.

To specifically redefine the cost function in this form, first redefinethe localizer functions to be specific to train pairs, i.e.,$\begin{matrix}\begin{matrix}{{L_{ij}\left( {{y_{ij};\alpha},\beta} \right)} = \quad {\beta - {\sum\limits_{h \in S_{ij}}{\sigma \left( {{{y_{ij} - a_{h}};\alpha},\beta} \right)}} +}} \\{\quad {{\sum\limits_{h \in S_{ij}}{\sigma \left( {{{y_{ij} - b_{h}};\alpha},\beta} \right)}} -}} \\{\quad {{\sigma \left( {{{w - y_{ij}};\alpha},\beta} \right)} - {{\sigma \left( {{{y_{ij} - e};\alpha},\beta} \right)}.}}}\end{matrix} & \text{(6-4)}\end{matrix}$

Where the subscript “h” identifies a siding.

Finally redefine the cost function as $\begin{matrix}{{{C\left( \overset{\rightarrow}{y} \right)} = {\sum\limits_{y_{ij} \in I}{L_{ij}\left( {{y_{ij};\alpha},\beta} \right)}}},} & \text{(6-6)}\end{matrix}$

which extends the definition of feasibility so that now the value ofC({right arrow over (y)}) will be low if and only if

(1) all train trajectory intersections occur on siding bars, and

(2) at least one of the two trains in such an intersection can be sidedin the corresponding siding.

Note that this technique can be extended beyond the consideration oftrain length versus siding length: if neither of two trains T_(i) andT_(j) can be sided on siding S_(k) for any reason, then the localizerfor the intersection point y_(ij) should omit the term corresponding toS_(k). For example, we may have a case where a coal train could be sidedat S_(k), but would be unable to restart because of grade, but theinterfering train, a multimodal, is absolutely not to be sided for acoal train. In this case, the siding may be long enough for eithertrain, but would be precluded from consideration anyway. Clearly inother embodiments the definition of each S_(ij) can be contracted toexclude cases such as this, thereby sharpening the ability of the searchprocess to prevent unacceptable sidings.

Economic Costs, Early Departure, and Speed Constraints

The cost function as described by either Equation 5-6 or 6-6 willfacilitate the finding of feasible train schedules, but includes nocognizance of the other effects of altering individual train schedulesto achieve feasibility. In another embodiment, the cost function ismodified so that it jointly considers schedule feasibility, and theeconomic cost of late arrival.

Economic Costs (i.e., Late Arrival) Function

Railroad freight service may incur various types of incentives foron-time delivery of freight. For the moment, consider just two types ofdelay penalties:

(1) step function penalty—if a train T_(i) misses a preset delivery timeti, there is a fixed penalty cost h_(i);

(2) step function plus linear increase—if the preset delivery time ti ismissed, there is an immediate penalty h_(i) (possibly 0) whichthereafter linearly increases at a rate of m_(i) dollars per hour.

FIG. 11A depicts a single generic form for both of these cases, sinceboth h_(i) and m_(i) may be zero or positive. Thus, FIG. 11A illustratesa combined penalty function including both a step penalty plus a linearpenalty.

The cost function as proposed is in not a differentiable function sinceit lacks a defined slope at the time t_(i). This fact precludes, or atleast complicates, use of any gradient search technique for minimizingeconomic cost unless special allowances are made at or near the timet_(i). For this reason, FIGS. 11B and 11C depict two approximations tothe cost function, a step plus linear penalty, and a linear penaltyonly, respectively. In both figures, a line segment is grafted onto asigmoid function in such a way that the resulting function remainsdifferentiable at all points.

For the step plus linear penalty, a sigmoid is used to represent thecost up to a time slightly beyond t_(i), to which is then appended aline of slope m_(i). See FIG. 11B. Provided the crossover point fromsigmoid to line segment is chosen at the point of the sigmoid where theslope is exactly m_(i), (reference character 110) the resultingapproximation is differentiable at all points, and therefore smoothlyintegratable into a gradient search process. If (t_(c), y_(c))represents the crossover point; then the differentiable version of thepenalty function may be defined by $\begin{matrix}{{A_{i}\left( {{t;t_{i}},h_{i},m_{i}} \right)} = \left\{ \begin{matrix}{h_{i}{\sigma \left( {{t - t_{i}};\alpha_{i}} \right)}} & {{{for}\quad t} < t_{c}} \\{{m_{i}t} + y_{c} - {m_{i}t_{i}}} & {{{for}\quad t} \geq t_{c}}\end{matrix} \right.} & \text{(7-1)}\end{matrix}$

The sigmoids used here will all have β_(t) values of 1, so that thenotation for the parameter β_(t) in each sigmoid will be suppressed.This choice is made so that the asymptote of the sigmoid is determinedto be h_(i), in conjunction with the penalty value to be represented.

The value of α_(i) is positive, and may be chosen to approximate thestep cost as sharply as desired. In one embodiment the search is startedwith “gentle” sigmoids, then increase the values of the α_(i)'s as thesearch progresses. This allows the early search to progress towardcorrect economic decisions rapidly, and then in the later stages ofsearch, the information concerning economic cost is sharpened to providemore accurate final results.

In order to determine the crossover point 110 ((t_(c), y_(c)) in FIG.11B), it is necessary to solve the equation $\begin{matrix}{{{\frac{\partial}{\partial t}\left( {h_{i}{\sigma \left( {t;\alpha_{i}} \right)}} \right)}}_{t = t_{c}} = m_{i}} & \text{(7-2)}\end{matrix}$

for the value of t_(c), with t_(c)>t_(i). The technique for solving thisequation is well known to those skilled in the art. It should bementioned that the slope of σ(t−t_(i);α_(i)) is everywhere positive, andtakes a maximum at the point t=t_(i). That maximum can be driven as highas possible by selecting a large α_(i), so solving Equation 7-2 isalways possible.

Finally, for the purposes of expressing the gradient as will beexplained below, note that the independent variable t in Equation 7-1 isin fact a function of the departure time d_(i) and speed s_(i) of trainT_(i), and therefore we may rewrite the equation as $\begin{matrix}{{A_{i}\left( {s_{i},{d_{i};t_{i}},h_{i},m_{i}} \right)} = \left\{ {\begin{matrix}{h_{i}{\sigma \left( {{d_{i} + \frac{L}{s_{i}} - t_{i}};\alpha_{i}} \right)}} & {{{{for}\quad d_{i}} + \frac{L}{s_{i}}} < t_{c}} \\{{m_{i}d_{i}} + \frac{L}{s_{i}} + y_{c} - {m_{i}t_{i}}} & {{{{for}\quad d_{i}} + \frac{L}{s_{i}}} \geq t_{c}}\end{matrix}.} \right.} & \text{(7-3)}\end{matrix}$

FIG. 10C also uses a transition from sigmoid to line segment at point112 on the sigmoid where the slope is exactly that of the line: thedifference is that in this case the crossover point t_(c) is less thant_(i). Except for that fact, the approximating function has adescription identical to that provided in Equations 7-1 and 7-3.

Now, we extend the cost function of Equation 5-6 or Equation 6-6 asfollows. The extended cost function accounting for both schedulefeasibility and economic cost is defined by $\begin{matrix}{{{F\left( \overset{\rightarrow}{y} \right)} = {{\eta \quad {C\left( \overset{\rightarrow}{y} \right)}} + {\left( {1 - \eta} \right){\sum\limits_{i = 1}^{n_{T}}{A_{i}\left( {\overset{\rightarrow}{s},{\overset{\rightarrow}{d};t_{i}},h_{i},m_{i}} \right)}}}}},} & \text{(7-4)}\end{matrix}$

where

ηε[0,1] is a weighting factor between 0 and 1 used to adjust therelative importance between economic and schedule feasibilityconsiderations.

{right arrow over (d)}=(d₁,d₂, . . . , d_(n) _(T) ) is the vector oftrain departure times,

{right arrow over (s)}=(s₁,s₂, . . . , s_(n) _(T) ) is the vector oftrain speeds.

In fact, the intersection points y of train trajectories are functionsof the train departure times and speeds, so we may rewrite Equation 7-4in the form $\begin{matrix}{{{F\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} = {{\eta \quad {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)}} + {\left( {1 - \eta} \right){\sum\limits_{i = 1}^{n_{T}}{A_{i}\left( {s_{i},{d_{i};t_{i}},h_{i},m_{i}} \right)}}}}},} & \text{(7-5)}\end{matrix}$

and it is from this latter form that the gradient may be directlycomputed as discussed below.

The value of the weighting factor η must be chosen, and the choice is ofsome importance. Note that the cost function as defined in Equation 7-5will be driven upward both by infeasible scheduling choices, as well aschoices that make trains late, and vice versa. The difficulty ariseswhen changes of departure times or speeds cause countervailing effectsin the two halves of the cost function of Equation 7-5. If the firstterm, representing feasibility, is driven up by less than the secondterm, representing timeliness, is driven down, then the search processmay be emphasizing economic cost to such an extent that it converges oninfeasible schedules.

In one embodiment, the weighting actor η can be varied during thesearch. For example, starting with a low value of η would tend to try toforce low economic cost at the expense of feasibility. This might causethe trains to swap places in the lineup, to improve the overalltimeliness of arrivals, before the actual emphasis begins on selectingspeeds and departure times that create a feasible schedule. In anyevent, the decision as to how to vary η during the search will benefitfrom actual testing with examples, and final mechanism for modulating ηwill necessarily come from experience familiar to those skilled in theart.

An approximate process for gauging the weighting factor Ci is to notethat the cost components C({right arrow over (s)},{right arrow over(d)}) and$\sum\limits_{i = 1}^{n_{T}}\quad {A\left( {s_{i},{d_{i};t_{i}},h_{i},m_{i}} \right)}$

comprise different numbers of summands, and therefore have differentmagnitudes approximately in proportion to the number of summandsinvolved. For example, if there are a total of twenty trains, resultingin sixty intersections on the string graph, then C({right arrow over(s)},{right arrow over (d)}) comprises sixty summands and$\sum\limits_{i = 1}^{n_{T}}\quad {A\left( {s_{i},{d_{i};t_{i}},h_{i},m_{i}} \right)}$

comprises twenty summands. To more or less equalize the effects of thesetwo contributions to the cost function, one would set the weight η tothe value η=20/(60+20)=0.25, thereby equalizing the contribution of eachhalf of the cost function (i.e., the two terms C({right arrow over (s)},{right arrow over (d)}) and$\sum\limits_{i = 1}^{n_{T}}\quad {{A\left( {s_{i},{d_{i};t_{i}},h_{i},m_{i}} \right)}\text{)}}$

to the total cost. From this example, it can be seen that theestablishment of a specific value of η is very specific to the situationunder study, as is generally recognized by those proficient in the artof complex optimization.

Early Departure Cost Function

The late penalty assessed for economic reasons will tend to preventtrain departures from being arbitrarily late. However, the formulationsof cost functions so far given (Equations 5-6, 6-6, 7-5) have no termswhich prevent the train trajectories from being arbitrarily early. Acost function to prevent early departures can be formulated in terms ofthe ubiquitous sigmoid function by defining a cost $\begin{matrix}{{{E\left( \overset{\rightharpoonup}{d} \right)} = {\sum\limits_{i = 1}^{n_{T}}\quad \left\lbrack {1 - {\sigma \left( {{d_{i} - e_{i}};\alpha_{i}^{\prime}} \right)}} \right\rbrack}},} & \text{(7-6)}\end{matrix}$

where

e_(i) is the earliest possible departure time for train T_(i),

and

α′_(i) is denoted with a prime to distinguish it from the α_(i) ofEquation 7-3.

FIG. 12 represents a term of this cost function for train T_(i);clearly, it rapidly becomes high as train T_(i) is pushed toward anunrealizable departure time, and rapidly drops as the departure timeenters the realizable region. There is no actual economic costassociated with early departures, just a feasibility issue. Thereforethe terms of Equation 7-6 representing each train are arbitrarily givena height of 1, (i.e., sigmoid asymptotic value of 1) and this Equation7-6 can likewise be combined with the cost functions for schedulefeasibility and economic cost. Specifically, let $\begin{matrix}{{{G\left( {\overset{\rightharpoonup}{s},\overset{\rightharpoonup}{d}} \right)} = {{\eta_{i}{C\left( {\overset{\rightharpoonup}{s},\overset{\rightharpoonup}{d}} \right)}} + {\eta_{2}{A\left( {\overset{\rightharpoonup}{s},\overset{\rightharpoonup}{d}} \right)}} + {\eta_{3}{E\left( \overset{\rightharpoonup}{d} \right)}}}},\text{where}} & \text{(7-7)} \\{{\eta_{1} + \eta_{2} + \eta_{3}} = 1.} & \text{(7-8)}\end{matrix}$

In one embodiment, the specific weighting of the components of cost inEquation 7-7 can be calculated as discussed above in the example withtwenty trains and sixty intersections points in the corridor. Theschedule feasibility and early departure terms will each have sixtysummands and the economic penalty term will have twenty terms. Using anequation similar to the one set forth above for calculating η, wecalculate η₁={fraction (1/7)}, η₂={fraction (3/7)} and η₃={fraction(3/7)}. Other weighting values can be established based on specific usercircumstances.

Maximum Train Speed Cost Function

In the embodiment when the search process is permitted to vary trainspeeds in order to achieve feasibility and cost minimization, there mustbe a means to prevent the speeds from exceeding practical limits for thetrains and tracks involved. In this embodiment we will create anadditional component of the cost function that will enforce such speedconstraints. Such a speed constraint can be implemented analogously tothe early departure constraint of Equation 7-6. Specifically, define aspeed cost function as $\begin{matrix}{{{V\left( \overset{\rightharpoonup}{s} \right)} = {\sum\limits_{i = 1}^{n_{T}}\quad {\sigma \left( {s_{i} - s_{i}^{(\max)}} \right)}}},} & \text{(7-9)}\end{matrix}$

where

s_(i) ^((max))=the maximum allowable speed for train T_(i).

Like the other cost functions discussed herein, since the maximum speedcost function is derived from a sum of sigmoid functions, it id adifferentiable function with respect to the intersection points of thetrains on the corridor. Therefore a gradient search process can be usedto find the minima of the cost function values.

The total cost function, including feasibility of meets and passes,constraints on early departures and late arrivals (i.e., economicpenalty), as well as constraints on maximum train speed then is ageneralization of Equation 7-7, namely $\begin{matrix}{{{G\left( {\overset{\rightharpoonup}{s},\overset{\rightharpoonup}{d}} \right)} = {{\eta_{1}{C\left( {\overset{\rightharpoonup}{s},\overset{\rightharpoonup}{d}} \right)}} + {\eta_{2}{A\left( {\overset{\rightharpoonup}{s},\overset{\rightharpoonup}{d}} \right)}} + {\eta_{3}{E\left( \overset{\rightharpoonup}{d} \right)}} + {\eta_{4}{V\left( \overset{\rightharpoonup}{s} \right)}}}},\text{where}} & \text{(7-10)} \\{{\eta_{1} + \eta_{2} + \eta_{3} + \eta_{4}} = 1.} & \text{(7-11)}\end{matrix}$

The specific values of the weighting factors for the components ofEquation 7-10 can be determined by experiment. In one embodiment, usingthe same scheme as set forth above in conjunction with Equation (7-8),for twenty trains and sixty intersections, η₁=0.1 and η₂=η₃=η₄=0.3.

The Gradient Search Process

The gradient ∇f ({right arrow over (x)}) of any function f({right arrowover (x)}) is a vector in the same space as the independent variable{right arrow over (x)} which points in direction of maximum change off({right arrow over (x)}) within a small local area on the function'ssurface, thereby pointing the way toward a local minimum or maximum. Assuch, it is much heralded in the legends and poetry of optimizationtheory. Calculation of the gradient of the various cost functionsdiscussed below will permit location of the local minima identifyringschedule feasibility.

In the current context of train scheduling, as will be appreciated bythose skilled in the art, there are a number of possible parametersdescribing a train trajectory that may be varied to resolve conflictswithin a rail corridor, i.e., to drive the cost function lower. Themathematics for a gradient search varying only the departure times orspeeds of trains, and then varying both departure times and train speedsis discussed below. We will first deal only with the cost functionassociated with schedule feasibility (Equation 5-6) but will then extendthe cost function to include considerations of economic costs, earlydepartures and maximum train speed as discussed above, and representedby the cost function of Equation 7-10.

Gradient Search to Optimize Schedule Feasibility By Varying Only theTrain Departure Times

First, assume that there are n_(t) trains and permit the vector {rightarrow over (y)} (as represented in Equation (5-2)) to contain allpossible intersection points. But each intersection point y_(ij) has thecharacterization given in Equation 3-6, which is repeated here forconvenience. $\begin{matrix}{{y_{ij} = \frac{{s_{i}{s_{j}\left( {d_{i} - d_{j}} \right)}} + {\left( {{s_{i}\theta_{j}} - {s_{j}\theta_{i}}} \right)L}}{s_{i} - s_{j}}},} & \text{(8-1)}\end{matrix}$

then y_(ij) is directly expressed in terms of departure times and speedsfor all of the trains in the schedule. Also for convenience, recall thenotation for speeds and departure times originally introduced above,which are repeated below.

L=the length of the corridor,

s_(i)=the speed of train T_(i) (taken as a negative value for T_(i)westbound),

d_(i)=the departure time (time of entry into corridor) of train t_(i),and $\theta_{i} = \left\{ {\begin{matrix}0 & {{for}\quad T_{i}\quad {eastbound}} \\1 & {{for}\quad T_{i}\quad {westbound}}\end{matrix}.} \right.$

Next define the vectors {right arrow over (e)}=(s₁, . . . , s_(n) _(T) )and (d₁, . . . , d_(n) _(T) ). Express the cost function in thefollowing terms. For notational convenience, suppress the dependence ofthe localizer and cost functions on α and β. $\begin{matrix}{{C\left( \overset{\rightharpoonup}{y} \right)} = {{C\left( {\overset{\rightharpoonup}{s},\overset{\rightharpoonup}{d}} \right)} = {{\sum\limits_{y_{ij} \in I}\quad {L_{ij}\left( y_{ij} \right)}} = {\sum\limits_{y_{ij} \in I}\quad {{L_{ij}\left( {s_{i},s_{j},d_{i},d_{j}} \right)}.}}}}} & \text{(8-2)}\end{matrix}$

The objective is to vary the vector d (train departure times) in orderto drive the cost function lower, and one technique which can at leastlocate a local minimum of the cost function is the gradient-directeddescent, defined iteratively as follows.

(1) Start with an initial estimate for departure time, {right arrow over(d)}₀ for each train n_(T), a stopping criterion, ε>0, and a step sizeh.

(2) For the estimate, {right arrow over (d)}_(n), compute the gradient∇^(({right arrow over (d)}))C({right arrow over(d)})|_({right arrow over (d)}={right arrow over (d)}) _(n) of the costfunction at {right arrow over (d)}_(n), for varying only {right arrowover (d)}, and normalize it so that it has an absolute value of 1, i.e.,define $\begin{matrix}{\overset{\rightharpoonup}{g} = {\frac{\left. {\nabla^{(\overset{\rightharpoonup}{d})}{C\left( \overset{\rightharpoonup}{d} \right)}} \right|_{\overset{\rightharpoonup}{d} = {\overset{\rightharpoonup}{d}}_{n}}}{\left| {\nabla^{(\overset{\rightharpoonup}{d})}{C\left( \overset{\rightharpoonup}{d} \right)}} \middle| {}_{\overset{\rightharpoonup}{d} = {\overset{\rightharpoonup}{d}}_{n}} \right|}.}} & \text{(8-3)}\end{matrix}$

In the notation, the dependence of the cost function on s is suppressed,since for the nonce we are varying only {right arrow over (d)}.

(3) Compute the value C_(n)=C({right arrow over (d)}_(n)) compute {rightarrow over (d)}_(n+1)={right arrow over (d)}_(n)−h{right arrow over(g)}, and then compute C_(n+1)=C({right arrow over (d)}_(n+1)).

(4) If |C_(n)−C_(n+1)|<ε, then the search is stopped, and {right arrowover (d)}_(n+1) is accepted as the final answer. Otherwise, replace{right arrow over (d)}_(n) with {right arrow over (d)}_(n+1) and returnto Step (2). In the preferred embodiment, the search is stopped when|C_(n)−C_(n+1)|≦(0.001)|C₀−C₁|. The stopping threshold for such problemsis very situation dependent, as is generally recognized by practitionersof the art of optimization.

It remains to explicitly represent the gradient∇^(({right arrow over (d)}))C({right arrow over(d)})|_({right arrow over (d)}={right arrow over (d)}) _(n) which isused in the iteration. The cost function as shown in Equation 5-6 is afunction of the vector of intersection points, {right arrow over (y)},and the components of {right arrow over (y)} are functions of thecomponents of the vectors {right arrow over (s)} and {right arrow over(d)}. Since at this point only {right arrow over (d)} is variable, thegradient ∇^(({right arrow over (d)}))C({right arrow over (d)}) of thecost function, is a vector of the form $\begin{matrix}{{{\nabla^{(\overset{\rightarrow}{d})}{C\left( \overset{\rightarrow}{d} \right)}} = \left( {{\frac{\partial}{\partial d_{1}}{C\left( \overset{\rightarrow}{d} \right)}},{\frac{\partial}{\partial d_{2}}{C\left( \overset{\rightarrow}{d} \right)}},\ldots \quad,{\frac{\partial}{\partial d_{n_{T}}}{C\left( \overset{\rightarrow}{d} \right)}}} \right)},} & \text{(8-4)}\end{matrix}$

and we may obtain each component of ∇^(({right arrow over (d)}))C({rightarrow over (d)}) by applying the chain rule for differentiation:$\begin{matrix}\begin{matrix}{{\frac{\partial}{\partial d_{k}}{C\left( \overset{\rightarrow}{d} \right)}} = {{\frac{\partial}{\partial d_{k}}\left( {\sum\limits_{y_{ij} \in I}{L_{ij}\left( y_{ij} \right)}} \right)} = {\frac{\partial}{\partial d_{k}}\left( {\sum\limits_{\underset{i = {{k\bigvee j} = k}}{y_{ij} \in I}}{L_{ij}\left( y_{ij} \right)}} \right)}}} \\{= {\sum\limits_{y_{ik} \in I}\left\lbrack {\frac{\partial}{\partial y_{ik}}\left( {L_{ik}\left( y_{ik} \right)} \right)\frac{\partial}{\partial d_{k}}\left( y_{ik} \right)} \right\rbrack}} \\{= {\sum\limits_{y_{ik} \in I}{\frac{\partial}{\partial y_{ik}}\left( {L_{ik}\left( y_{ik} \right)} \right)\frac{\partial}{\partial d_{k}}\left( \frac{{s_{i}{s_{k}\left( {d_{i} - d_{k}} \right)}} + {\left( {{s_{i}\theta_{k}} - {s_{k}\theta_{i}}} \right)L}}{s_{i} - s_{k}} \right)}}}\end{matrix} & \text{(8-5)} \\{= {\sum\limits_{y_{ik} \in I}{\frac{\partial}{\partial y_{ik}}\left( {L_{ik}\left( y_{ik} \right)} \right){\left( \frac{{- s_{i}}s_{k}}{s_{i} - s_{k}} \right).\text{~~~~~~~~~~}}}}} & \text{(8-6)}\end{matrix}$

Using Equation 8-6 and Lemma A3 in the Appendix A we can finally expressthe k-th component of the gradient as $\begin{matrix}\begin{matrix}{{\frac{\partial}{\partial d_{k}}\left( {C\left( \overset{\rightarrow}{d} \right)} \right)} = \quad {\frac{\alpha}{\beta}{\sum\limits_{y_{ik} \in I}\left\{ {\sum\limits_{j = 1}^{n_{S}}\left\lbrack {{{\sigma \left( {y_{ik} - b_{j}} \right)}\left( {\beta - {\sigma \left( {y_{ik} - b_{j}} \right)}} \right)} -} \right.} \right.}}} \\{\quad {{{\sigma \left( {y_{ik} - a_{j}} \right)}\left( {\beta - {\sigma \left( {y_{ik} - a_{j}} \right)}} \right)} +}} \\{\quad {{{\sigma \left( {w - y_{ik}} \right)}\left( {\beta - {\sigma \left( {w - y_{ik}} \right)}} \right)} -}} \\{\left. {\left. {\begin{matrix}\overset{\quad {\quad \overset{\quad}{\quad}}}{\quad \overset{\quad}{\quad}} \\{\quad \underset{\quad}{\quad}}\end{matrix}\quad {\sigma \left( {y_{ik} - e} \right)}\left( {\beta - {\sigma \left( {y_{ik} - e} \right)}} \right)} \right\rbrack \left( \frac{s_{i}s_{k}}{s_{i} - s_{k}} \right)} \right\}.}\end{matrix} & \text{(8-7)}\end{matrix}$

Gradient Search to Optimize Schedule Feasibility by Varying Only theTrain Speeds

Much of what was developed above can be applied here as well. Theprimary difference is that we now emphasize that C({right arrow over(y)})may be regarded as a function of the vector {right arrow over (s)},with {right arrow over (d)} held constant, and we wish to vary {rightarrow over (s)} to seek a local minimum of the cost function, andsuppress the dependence on {right arrow over (d)}. We may thereforerepresent C({right arrow over (y)}) as

C({right arrow over (y)})=C({right arrow over (s)}).  (8-8)

Starting with $\begin{matrix}{{{\nabla^{(\overset{\rightarrow}{s})}{C\left( \overset{\rightarrow}{s} \right)}} = \left( {{\frac{\partial}{\partial s_{1}}{C\left( \overset{\rightarrow}{s} \right)}},{\frac{\partial}{\partial s_{2}}{C\left( \overset{\rightarrow}{s} \right)}},\ldots \quad,{\frac{\partial}{\partial s_{n_{T}}}{C\left( \overset{\rightarrow}{s} \right)}}} \right)},} & \text{(8-9)}\end{matrix}$

we need to compute the components of the form$\frac{\partial}{\partial s_{k}}\left( {C\left( \overset{\_}{s} \right)} \right)$

using the differentiation chain rule. To that end, note that$\begin{matrix}\begin{matrix}{{\frac{\partial}{\partial s_{k}}\left( {C\left( \overset{\rightarrow}{s} \right)} \right)} = {\frac{\partial}{\partial s_{k}}\left( {\sum\limits_{y_{ij} \in I}{L_{ij}\left( y_{ij} \right)}} \right)}} \\{= {\frac{\partial}{\partial s_{k}}\left( {\sum\limits_{y_{ik} \in I}{L_{ik}\left( y_{ik} \right)}} \right)}} \\{{= {\sum\limits_{y_{ik} \in I}{\frac{\partial}{\partial y_{ik}}\left( {L_{ik}\left( y_{ik} \right)} \right)\frac{\partial}{\partial s_{k}}\left( y_{ik} \right)}}},}\end{matrix} & \text{(8-10)}\end{matrix}$

and we proceed to obtain an explicit expression for${\frac{\partial}{\partial s_{k}}\left( y_{ik} \right)},$

as follows. $\begin{matrix}\begin{matrix}{{\frac{\partial}{\partial s_{k}}\left( y_{ik} \right)} = {\frac{\partial}{\partial s_{k}}\left( \frac{{s_{i}{s_{k}\left( {d_{i} - d_{k}} \right)}} + {\left( {{s_{i}\theta_{k}} - {s_{k}\theta_{i}}} \right)L}}{s_{i} - s_{k}} \right)}} \\{= \frac{{\left\lbrack {{s_{i}{s_{k}\left( {d_{i} - d_{k}} \right)}} + \left( {{s_{i}\theta_{k}} - {s_{k}\theta_{i}}} \right)} \right\rbrack \left( {- 1} \right)} + {\left( {s_{i} - s_{k}} \right)\left\lbrack {{s_{i}\left( {d_{i} - d_{k}} \right)} - {\theta_{i}L}} \right\rbrack}}{\left( {s_{i} - s_{k}} \right)^{2}}} \\{= {\frac{{{s_{i}\left( {d_{i} - d_{k}} \right)}\left( {s_{i} - {2s_{k}}} \right)} + {L\left( {{2s_{k}\theta_{i}} - {s_{i}\theta_{k}} - {s_{i}\theta_{i}}} \right)}}{\left( {s_{i} - s_{k}} \right)^{2}}.}}\end{matrix} & \text{(8-11)}\end{matrix}$

Exploiting Equations 8-10, 8-11, and Lemma A3 of the Appendix A providesa final explicit form for the gradient, as shown below $\begin{matrix}\begin{matrix}{{\frac{\partial}{\partial s_{k}}\left( {C\left( \overset{\rightarrow}{s} \right)} \right)} = \quad {\frac{\alpha}{\beta}{\sum\limits_{y_{ik} \in I}\left\{ {\sum\limits_{j = 1}^{N}\left\lbrack {{{\sigma \left( {y_{ik} - b_{j}} \right)}\left( {\beta - {\sigma \left( {y_{ik} - b_{j}} \right)}} \right)} -} \right.} \right.}}} \\{\quad {{{\sigma \left( {y_{ik} - a_{j}} \right)}\left( {\beta - {\sigma \left( {y_{ik} - a_{j}} \right)}} \right)} +}} \\{\quad {{{\sigma \left( {w - y_{ik}} \right)}\left( {\beta - {\sigma \left( {w - y_{ik}} \right)}} \right)} -}} \\{\left. {\left. {\begin{matrix}\overset{\quad {\quad \overset{\quad}{\quad}}}{\quad \overset{\quad}{\quad}} \\{\quad \underset{\quad}{\quad}}\end{matrix}\quad {\sigma \left( {y_{ik} - e} \right)}\left( {\beta - {\sigma \left( {y_{ik} - e} \right)}} \right)} \right\rbrack \frac{\partial}{\partial s_{k}}\left( y_{ik} \right)} \right\}.}\end{matrix} & \text{(8-12)}\end{matrix}$

The search rule using the gradient as computed in Equation 8-12 is anexact analogue of the search rule given in Equation 8-7 with anyoccurrence of the vectors {right arrow over (d)},{right arrow over(d)}₀,{right arrow over (d)}_(n),{right arrow over (d)}_(n+1) . . .replaced with the vectors {right arrow over (s)},{right arrow over(s)}₀,{right arrow over (s)}_(n+1) . . . , respectively.

Gradient Search to Optimize Schedule Feasibility by Varying bothDeparture Times and Train Speeds

Bearing in mind that the speeds and departure times of trains can bevaried independently, we may also exploit the expression of the costfunction as a function of both {right arrow over (s)} and {right arrowover (d)}, i.e.,

C({right arrow over (y)})=C({right arrow over (s)},{right arrow over(d)}),

and consider the joint variation of speed and departure time to seek acost function local minimum. In this case, the gradient vector takes theform $\begin{matrix}{{\nabla^{({\overset{\rightarrow}{s},\overset{\rightarrow}{d}})}{C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)}} = {\left( {{\frac{\partial}{\partial s_{1}}{C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)}},\ldots \quad,{\frac{\partial}{\partial s_{n_{T}}}{C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)}},{\frac{\partial}{\partial d_{1}}{C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)}},\ldots \quad,{\frac{\partial}{\partial d_{n_{T}}}{C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)}}} \right).}} & \text{(8-13)}\end{matrix}$

Because {right arrow over (s)} and {right arrow over (d)} are notfunctionally dependent on each other, it follows that $\begin{matrix}{{{\frac{\partial}{\partial s_{k}}\left( {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} = {{\frac{\partial}{\partial s_{k}}\left( {C\left( \overset{\rightarrow}{s} \right)} \right)\quad {and}\quad \frac{\partial}{\partial d_{k}}\left( {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} = {\frac{\partial}{\partial d_{k}}\left( {C\left( \overset{\rightarrow}{d} \right)} \right)}}},} & \text{(8-14)}\end{matrix}$

so the components of the gradient of Equation 8-13 are alreadydetermined by Equations 8-7, 8-11, and 8-12.

The search rule in this case is of the same form as Equation 8-7, exceptthat we consider the aggregate vector

{right arrow over (v)}=({right arrow over (s)},{right arrow over(d)}),  (8-15)

and replace all references to {right arrow over (d)},{right arrow over(d)}₀,{right arrow over (d)}_(n),{right arrow over (d)}_(n+1) in thatrule with references to {right arrow over (ν)},{right arrow over(ν)}₀,{right arrow over (ν)}_(n),{right arrow over (v)}_(n+1),respectively.

Including Early Departure Effects in the Gradient Search

Recall from the discussion above that a cost function causing high costfor early train departures, and low cost otherwise, can be posed interms of the sigmoid function. Repeating Equation 7-6, $\begin{matrix}{{{E\left( \overset{\rightarrow}{d} \right)} = {\sum\limits_{i = 1}^{n_{T}}\left\lbrack {1 - {\sigma \left( {{d_{i} - e_{i}};\alpha_{i}^{\prime}} \right)}} \right\rbrack}},} & \text{(8-16)}\end{matrix}$

where

e_(i) is the earliest possible departure time for train T_(i),

and

α′_(i) affects the steepness of the rise of cost as early departure isapproached.

The value of α′ may be set by experiment, but the results should not beparticularly sensitive to its value. A good first guess, in oneembodiment, for the value of α′_(i) would be 0.8, although thisparameter might be made smaller if there is some latitude as to theearliest departure times.

If we wish to combine this early departure cost with schedulefeasibility cost, we do so in a weighted sum of terms, i.e.,

D({right arrow over (s)},{right arrow over (d)})=ηC({right arrow over(s)},{right arrow over (d)})+(1−η)E({right arrow over(d)})ηε(0,1),  (8-17)

This concept was previously discussed above. See for example, Equation7-7 where the aggregate cost function includes schedule feasibility,economic cost, and early departure effects.

Since the gradient operation is linear on the space of functions towhich it applies, we may write

␣(D({right arrow over (s)},{right arrow over (d)}))=η∇(C({right arrowover (s)},{right arrow over (d)}))+(1−η)∇(E({right arrow over(d)})).  (8-18)

We will rely on the previous gradient computations for the first term onthe right side of Equation 8-17. See Equation 8-7 with the substitutionsset forth in Equation 8-15 and the text following.

To deal with the second term on the right side of Equation 8-17 or 8-18,assume only the departure time vector d will be varied in a search for aschedule which is both feasible and prevents early departures. We thenwish to determine the gradient of E({right arrow over (d)}) relative tothe vector {right arrow over (d)}, which is of the form $\begin{matrix}{{{\nabla^{(\overset{\rightarrow}{d})}\left( {E\left( \overset{\rightarrow}{d} \right)} \right)} = \left( {{\frac{\partial}{\partial d_{1}}\left( {E\left( \overset{\rightarrow}{d} \right)} \right)},{\frac{\partial}{\partial d_{2}}\left( {E\left( \overset{\rightarrow}{d} \right)} \right)},\ldots \quad,{\frac{\partial}{\partial d_{n_{T}}}\left( {E\left( \overset{\rightarrow}{d} \right)} \right)}} \right)},} & \text{(8-19)}\end{matrix}$

and (see Equations 8-6 and A-2) $\begin{matrix}\begin{matrix}{{\frac{\partial}{\partial d_{k}}\left( {E\left( \overset{\rightarrow}{d} \right)} \right)} = {\left( {1 - \eta} \right)\left\lbrack {\sum\limits_{i = 1}^{n_{T}}{\frac{\partial}{\partial d_{k}}\left( {1 - {\sigma \left( {{d_{i} - e_{i}};\alpha_{i}^{\prime}} \right)}} \right)}} \right\rbrack}} \\{= {{- \left( {1 - \eta} \right)}{\left( {1 - {{\sigma \left( {{d_{k} - e_{k}};\alpha_{k}^{\prime}} \right)}{\sigma \left( {{d_{k} - e_{k}};\alpha_{k}^{\prime}} \right)}}} \right).}}}\end{matrix} & \text{(8-20)}\end{matrix}$

We can now construct the gradient ∇^(({right arrow over (d)}))(D({rightarrow over (s)},{right arrow over (d)})) using Equations 8-7, 8-18, and8-20. Departure times are independent of train speeds, so the costcomponent E({right arrow over (d)}) does not depend on the speeds {rightarrow over (s)}. Thus the final form of the gradient

∇^(({right arrow over (s)},{right arrow over (d)})) E({right arrow over(s)},{right arrow over (d)})=(E ₁ , . . . , E _(n) _(T+1) , . . . , E_(2n) _(T) )  (8-21)

with both train speeds and departure times variable, can be summarizedas $\begin{matrix}{E_{i} = \left\{ \begin{matrix}{\eta \frac{\partial}{\partial s_{i}}\left( {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} & {{{for}\quad i} \in \left\{ {1,\ldots \quad,n_{T}} \right\}} \\{{\eta \frac{\partial}{\partial d_{i}}\left( {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} - {\left( {1 - \eta} \right)\left( {1 - {{\sigma \left( {{d_{i} - e_{i}};\alpha_{i}^{\prime}} \right)}{\sigma \left( {{d_{i} - e_{i}};\alpha_{i}^{\prime}} \right)}}} \right)}} & {{{for}\quad i} \in \left\{ {{n_{T} + 1},\ldots \quad,{2n_{T}}} \right\}}\end{matrix} \right.} & \text{(8-22)}\end{matrix}$

where reference is implicitly made to Equations 8-7, 8-12, and 8-15.

Including the Economic Costs in the Gradient Search

The types of costs incurred by railroads for late deliveries werediscussed above, and there was provided a differentiable approximationto the function of late costs expressed as a function of time. By usingsuch an approximation, which is everywhere differentiable, the avoidanceof late costs can be incorporated into the gradient search process.Arrival times are affected by both train speeds and train departuretimes, although either speed, departure time, or both may be variedduring the search.

The form of the late cost approximation function was given by (seeEquation 7-3) $\begin{matrix}{{A_{i}\left( {{u_{i};t_{i}},h_{i},m_{i}} \right)} = \left\{ {\begin{matrix}{h_{i}{\sigma \left( {{u_{i} - t_{i}};\alpha_{i}} \right)}} & {{{for}\quad u_{i}} < t_{c}} \\{y_{c} + {m_{i}\left( {u_{i} - t_{i}} \right)}} & {{{for}\quad u_{i}} \geq t_{c}}\end{matrix},} \right.} & \text{(8-23)}\end{matrix}$

where

u_(i)=the actual arrival time of the train,

t_(i)=the time at which late penalties begin to accrue,

h_(i)=the size of the step penalty (in k$),

m_(i)=the rate of the linear portion of the penalty (in k$/hr.), and

t_(c)=the transition point where the cost function changes from asigmoid to a line segment.

Shortening this cost function to the form A_(i)(u_(i)) for the nonce,and defining {right arrow over (u)}=(u₁, . . . , u_(n) _(T) ), we mayexpress a cost function which accounts for the arrival times of alltrains in the form $\begin{matrix}{{A\left( \overset{\rightarrow}{u} \right)} = {\sum\limits_{i = 1}^{n_{T}}{{A_{i}\left( u_{i} \right)}.}}} & \text{(8-24)}\end{matrix}$

But we also have the relationship $\begin{matrix}{{u_{i} = {d_{i} + \frac{L}{s_{i}}}},} & \text{(8-25)}\end{matrix}$

so we may consider an alternative representation of Equation 8-24 as$\begin{matrix}{{A\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} = {\sum\limits_{i = 1}^{n_{T}}{{A_{i}\left( {s_{i},d_{i}} \right)}.}}} & \text{(8-26)}\end{matrix}$

This latter form of the cost is appropriate to our search process, sincethat process is based on varying the components of the vector s and d.

Now to incorporate late arrival costs into the search, we extend thecost function of Equation 8-18 to the form

D({right arrow over (s)},{right arrow over (d)})=η₁ C({right arrow over(s)},{right arrow over (d)})+η₂ E({right arrow over (d)})+η₃ A({rightarrow over (s)},{right arrow over (d)}),  (8-27)

where the η₁ are weighting factors satisfying

η₁+η₂+η₃=1,  (8-28)

The choices for these weights must be determined by experiment, and inone embodiment of the present invention it is possible to vary themiteratively as the search progresses. Individual users of the presentinvention may assign these weights as determined by the characteristicsof the corridor and the costs imposed to the railroad for the variouseffects built into the search algorithm. In the preferred embodiment,these weights take on values as determined in conjunction with thediscussion of Equation (7-8) above.

Gradient Search to Optimize Schedule Feasibility, Early Departures, andEconomic Costs by Varying Only the Train Departure Times

A search using the late arrival cost function of equation 8-27 mayinvolve variation of only the departure times {right arrow over (d)}, inwhich case the gradient by which the search is directed is of a formanalogous to that shown in Equation 8-19. We may then express acomponent of the gradient vector in the form $\begin{matrix}{{\frac{\partial}{\partial d_{k}}\left( {D\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} = {{\eta_{1}\frac{\partial}{\partial d_{k}}\left( {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} + {\eta_{2}\frac{\partial}{\partial d_{k}}{E\left( \overset{\rightarrow}{d} \right)}} + {\eta_{3}{{A\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)}.}}}} & \text{(8-29)}\end{matrix}$

Borrowing from Equations 8-6 and 8-20, we expand Equation 8-29 to theform $\begin{matrix}\begin{matrix}{{\frac{\partial}{\partial d_{k}}\left( {D\left( {\overset{\rightarrow}{d},\overset{\rightarrow}{s}} \right)} \right)} = \quad {{\eta_{i}\left\lbrack {\sum\limits_{y_{ik} \in I}{\frac{\partial}{\partial y_{ik}}\left( {L_{ik}\left( y_{ik} \right)} \right)\left( \frac{{- s_{i}}s_{k}}{s_{i} - s_{k}} \right)}} \right\rbrack} -}} \\{\quad {{\eta_{2}\left( {1 - {{\sigma \left( {{d_{k} - e_{k}};\alpha_{k}^{\prime}} \right)}{\sigma \left( {{d_{k} - e_{k}};\alpha_{k}^{\prime}} \right)}}} \right)} +}} \\{\quad {\eta_{3}\frac{\partial}{\partial d_{k}}\left( {A\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)}} \\{= \quad {{\eta_{1}\left\lbrack {\sum\limits_{y_{ik} \in I}{\frac{\partial}{\partial y_{ik}}\left( {L_{ik}\left( y_{ik} \right)} \right)\left( \frac{{- s_{i}}s_{k}}{s_{i} - s_{k}} \right)}} \right\rbrack} -}} \\{\quad {{\eta_{2}\left( {1 - {{\sigma \left( {{d_{k} - e_{k}};\alpha_{k}^{\prime}} \right)}{\sigma \left( {{d_{k} - e_{k}};\alpha_{k}^{\prime}} \right)}}} \right)} +}} \\{\quad {\eta_{3}\frac{\partial}{\partial u_{k}}\left( {A_{k}\left( u_{k} \right)} \right)\frac{\partial}{\partial d_{k}}\left( u_{k} \right)}} \\{= \quad {{\eta_{1}\left\lbrack {\sum\limits_{y_{ik} \in I}{\frac{\partial}{\partial y_{ik}}\left( {L_{ik}\left( y_{ik} \right)} \right)\left( \frac{{- s_{i}}s_{k}}{s_{i} - s_{k}} \right)}} \right\rbrack} -}} \\{\quad {{\eta_{2}\left( {1 - {{\sigma \left( {{d_{k} - e_{k}};\alpha_{k}^{\prime}} \right)}{\sigma \left( {{d_{k} - e_{k}};\alpha_{k}^{\prime}} \right)}}} \right)} +}} \\{\quad \left\{ {\begin{matrix}{\eta_{3}h_{k}{\alpha_{k}\left( {1 - {\sigma \left( {u_{k};\alpha_{k}} \right)}} \right)}{\sigma \left( {u_{k};\alpha_{k}} \right)}} & {{{for}\quad u_{k}} \leq t_{c}} \\{\eta_{3}m_{k}} & {{{for}\quad u_{k}} > t_{c}}\end{matrix},} \right.}\end{matrix} & \text{(8-30)}\end{matrix}$

which, with the help of Equation 8-7, provides an explicitrepresentation of the components of the gradient of D({right arrow over(s)},{right arrow over (d)}) when only the train departure times arevaried.

Gradient Search to Optimize Schedule Feasibility, Early Departures, andEconomic Costs by Varying Only the Train Speeds

If the departure times of trains are held constant, and speeds arevaried, then the gradient used to alter the speed vector {right arrowover (s)}=(s₁, . . . , s_(n) _(T) ) during the search is of the form

∇^(({right arrow over (s)})) D({right arrow over (s)},{right arrow over(d)})=∇(η₁ C({right arrow over (s)}, {right arrow over (d)})+)η₂E({right arrow over (d)})+η₃ A({right arrow over (s)},{right arrow over(d)}))

 =η₁ ∇C({right arrow over (s)},{right arrow over (d)})+η₃ ∇A({rightarrow over (s)},{right arrow over (d)}),  (8-31)

Where E({right arrow over (d)}) is independent of the train speed. Wetherefore can obtain the k-th component of this gradient as$\begin{matrix}\begin{matrix}{{\frac{\partial}{\partial s_{k}}\left( {D\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} = {{\eta_{1}\frac{\partial}{\partial s_{k}}\left( {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} + {\eta_{3}\frac{\partial}{\partial s_{k}}\left( {A\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)}}} \\{= {{\eta_{1}\frac{\partial}{\partial s_{k}}\left( {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} + {\eta_{3}\left\lbrack {\frac{\partial}{\partial u_{k}}\left( {A\left( \overset{\rightarrow}{u} \right)} \right)\frac{\partial}{\partial s_{k}}\left( u_{k} \right)} \right\rbrack}}} \\{= {{\eta_{1}\frac{\partial}{\partial s_{k}}\left( {C\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} + {\eta_{3} \cdot \left\{ \begin{matrix}\frac{{- h_{k}}\alpha_{k}{L\left( {1 - {\sigma \left( {u_{k};\alpha_{k}} \right)}} \right)}{\sigma \left( {u_{k};\alpha_{k}} \right)}}{s_{k}^{2}} & \left( {u_{k} \leq t_{k}} \right) \\\frac{- {Lm}_{k}}{s_{k}^{2}} & \left( {u_{k} > t_{k}} \right)\end{matrix} \right.}}}\end{matrix} & \text{(8-32)}\end{matrix}$

where the first term on the right side of Equation 8-32 can be expressedin a completely explicit form by reference back to Equation 8-12.

Gradient Search to Optimize Schedule Feasibility, Early Departures, andEconomic Costs by Varying Both Train Departure Times and Train Speeds

In this case, both {right arrow over (d)} and {right arrow over (s)} arevariables in the complete cost function of Equation 8-25, so thegradient takes the form

∇^(({right arrow over (s)},{right arrow over (d)}))(D({right arrow over(s)},{right arrow over(d)}))=η₁∇^(({right arrow over (s)},{right arrow over (d)}))(C({rightarrow over (s)},{right arrow over(d)}))+η₂∇^(({right arrow over (d)}))(E({right arrow over(d)}))+η₃∇^(({right arrow over (s)},{right arrow over (d)}))(A({rightarrow over (s)},{right arrow over (d)})).  (8-33)

Again regarding the gradient in vector form, the components of the firstterm of the sum on the left of Equation 8-33 are readily obtainable withthe help of Equations 8-14, as explicitly represented with the help ofEquations 8-7, 8-11, and 8-12. The components of the second term can beobtained using Equation 8-20, and the components of the third term areobtained using Equations 8-30 and 8-32.

Including Maximum Speed Limitation Effects in the Gradient Search

A component of the cost function that would rise sharply in value as thespeed s of a train T_(i) became close to the maximum speed s_(i)^((max)) specified for the train was developed above. That component hadthe formulation (see Equation 7-9) $\begin{matrix}{{V\left( \overset{\rightarrow}{s} \right)} = {\sum\limits_{i = 1}^{n_{T}}{\sigma \left( {s_{i} - s_{i}^{(\max)}} \right)}}} & \text{(8-34)}\end{matrix}$

and occurred as a weighted term of the cost function, i.e.,

G({right arrow over (s)},{right arrow over (d)})=η₁ C({right arrow over(s)},{right arrow over (d)})+η₂ A({right arrow over (s)},{right arrowover (d)})+η₃ E({right arrow over (d)})+η₄ V({right arrow over(s)})  (8-35)

where the sum of the weights is chosen to be 1 in the preferredembodiment. Since variation of speed is independent of the departuretimes of trains, we have that

∇^(({right arrow over (d)})) V({right arrow over (s)})=0,  (8-36)

so constraining the search by maximum train speeds does not effect thecomponents of the gradient obtained as partial derivatives with respectto the departure times. Relative to the gradient terms obtained aspartial derivatives with respect to train speeds, we have$\begin{matrix}{\begin{matrix}{{\nabla^{(\overset{\rightarrow}{s})}{G\left( {\overset{\rightarrow}{d},\overset{\rightarrow}{s}} \right)}} = \quad {{\eta_{1}{\nabla^{(\overset{\rightarrow}{s})}{C\left( {\overset{\rightarrow}{d},\overset{\rightarrow}{s}} \right)}}} + {\eta_{2}{\nabla^{(\overset{\rightarrow}{s})}{A\left( {\overset{\rightarrow}{d},\overset{\rightarrow}{s}} \right)}}} + {\eta_{4}{\nabla^{(\overset{\rightarrow}{s})}{V\left( \overset{\rightarrow}{s} \right)}}}}} \\{= \quad {{\eta_{1}{\nabla^{(\overset{\rightarrow}{s})}{C\left( {\overset{\rightarrow}{d},\overset{\rightarrow}{s}} \right)}}} + {\eta_{2}{\nabla^{(\overset{\rightarrow}{s})}{A\left( {\overset{\rightarrow}{d},\overset{\rightarrow}{s}} \right)}}} +}} \\{\quad {\eta_{4}\left( {{\frac{\partial}{\partial s_{1}}\left( {V\left( \overset{\rightarrow}{s} \right)} \right)},\ldots \quad,{\frac{\partial}{\partial s_{n_{\tau}}}\left( {V\left( \overset{\rightarrow}{s} \right)} \right)}} \right)}}\end{matrix},{and}} & \text{(8-37)} \\{\begin{matrix}{{\frac{\partial}{\partial s_{k}}\left( {V\left( \overset{\rightarrow}{s} \right)} \right)} = {\frac{\partial}{\partial s_{k}}\left( {\sum\limits_{i = 1}^{n_{T}}{\sigma \left( {{{s_{i} - s_{i}^{(\max)}};\alpha},\beta} \right)}} \right)}} \\{= {\frac{\alpha}{\beta}\left( {1 - {\sigma \left( {{{s_{i} - s_{i}^{(\max)}};\alpha},\beta} \right)}} \right)\sigma \quad \left( {{{s_{i} - s_{i}^{(\max)}};\alpha},\beta} \right)}}\end{matrix},} & \text{(8-38)}\end{matrix}$

where the explicit form of the derivative in Equation 8-38 is fromEquation A-2 of the Appendix.

Expression of the Full Gradient

For the sake of completeness, the complete expressions of thesecomponents of Equation 8-38 are provided below. First, let$\begin{matrix}{D_{k} = \left\{ \begin{matrix}{\frac{\partial}{\partial s_{k}}\left( {D\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} & {{{for}\quad k} \in \left\{ {1,\ldots \quad,n_{T}} \right\}} \\{\frac{\partial}{\partial d_{k}}\left( {D\left( {\overset{\rightarrow}{s},\overset{\rightarrow}{d}} \right)} \right)} & {{{for}\quad k} \in \left\{ {{n_{T} + 1},\ldots \quad,{2n_{T}}} \right\}}\end{matrix} \right.} & \text{(8-39)}\end{matrix}$

and select the weighting factors η₁, η₂, η₃, η₄ satisfying

η₁+η₂+η₃+η₄=1.

Note the indexing of the vector {right arrow over (D)} places thepartial derivatives with respect to s_(k) first and then the partialderivatives with respect to d_(k) second, but there are n_(T) values ofeach index. $\begin{matrix}{\begin{matrix}{D_{k} = \quad {\eta_{1}\frac{\alpha}{\beta}{\sum\limits_{y_{ik} \in I}\left\{ {\sum\limits_{j = 1}^{N}\left\lbrack {{\sigma \quad \left( {y_{ik} - b_{j}} \right)\quad \left( {\beta - {\sigma \left( {y_{ik} - b_{j}} \right)}} \right)} - {\sigma\left( {y_{ik} -} \right.}} \right.} \right.}}} \\{\quad {{{\sigma \left( {y_{ik} - a_{j}} \right)}\left( {\beta - {\sigma \quad \left( {y_{ik} - a_{j}} \right)}} \right)} + {\left( {w - y_{ik}} \right)\left( {\beta - {\sigma\left( {w -} \right.}} \right.}}} \\{\left. \left. {\left. {\left. {\quad \left. y_{ik} \right)} \right) - {{\sigma \left( {y_{ik} - e} \right)}\quad \left( {\beta - {\sigma \left( {y_{ik} - e} \right)}} \right)}} \right\rbrack \frac{\partial}{\partial s_{k}}\left( y_{ik} \right)} \right) \right\} +} \\{\quad {{\eta_{3} \cdot \left( \frac{- L}{s_{k}^{2}} \right)}\left\{ {\begin{matrix}{h_{k}{\alpha_{k}\left( {1 - {\sigma \left( {u_{k};\alpha_{k}} \right)}} \right)}{\sigma \left( {u_{k};\alpha_{k}} \right)}} & \left( {u_{k} \leq t_{k}} \right) \\m_{k} & \left( {u_{k} > t_{k}} \right)\end{matrix} +} \right.}} \\{\quad {\eta_{4}\frac{\alpha}{\beta}\left( {1 - {\sigma \left( {{{s_{i} - s_{i}^{(\max)}};\alpha},\beta} \right)}} \right)\sigma \quad \left( {{{s_{i} - s_{i}^{(\max)}};\alpha},\beta} \right)}}\end{matrix},} & \text{(8-40)} \\{where} & \quad \\{{\frac{\partial}{\partial s_{k}}\left( y_{ik} \right)} = {\frac{{{s_{i}\left( {d_{i} - d_{k}} \right)}\quad \left( {s_{i} - {2s_{k}}} \right)} + {L\left( {{2s_{k}\theta_{i}} - {s_{i}\theta_{k}} - {s_{i}\theta_{i}}} \right)}}{\left( {s_{i} - s_{k}} \right)^{2}}.}} & \text{(8-41)}\end{matrix}$

$\begin{matrix}{{{{For}\quad k} \in \quad \left\{ {{n_{T} + 1},\ldots \quad,{2n_{T}}} \right\}},{\begin{matrix}{D_{k} = \quad {\eta_{1}\frac{\alpha}{\beta}{\sum\limits_{y_{ik} \in I}\left\{ {\sum\limits_{j = 1}^{n_{S}}\left\lbrack {{\sigma \quad \left( {y_{ik} - b_{j}} \right)\quad \left( {\beta - {\sigma \left( {y_{ik} - b_{j}} \right)}} \right)} -} \right.} \right.}}} \\{\quad {{{\sigma \left( {y_{ik} - a_{j}} \right)}\left( {\beta - {\sigma \left( {y_{ik} - a_{j}} \right)}} \right)} +}} \\{\quad {{{\sigma \left( {w - y_{ik}} \right)}\quad \left( {\beta - {\sigma \left( {w - y_{ik}} \right)}} \right)} -}} \\{\left. {{\quad \left. {{\sigma \left( {y_{ik} - e} \right)}\left( {\beta - {\sigma \left( {y_{ik} - e} \right)}} \right)} \right\rbrack}\quad \left( \frac{s_{i}s_{k}}{s_{i} - s_{k}} \right)} \right\} -} \\{\quad {{\eta_{2}\left( {1 - {{\sigma \left( {{d_{i} - e_{i}};\alpha_{i}^{\prime}} \right)}{\sigma \left( {{d_{i} - e_{i}};\alpha_{i}^{\prime}} \right)}}} \right)} +}} \\{\quad {\eta_{3}\left\{ \begin{matrix}{h_{k}{\alpha_{k}\left( {1 - {\sigma \left( {u_{k};\alpha_{k}} \right)}} \right)}{\sigma \left( {u_{k};\alpha_{k}} \right)}} & {{{for}\quad u_{k}} \leq t_{c}} \\m_{k} & {{{for}\quad u_{k}} > t_{c}}\end{matrix} \right.}}\end{matrix}.}} & \text{(8-42)}\end{matrix}$

Illustration of the Gradient Search Process

An example with twelve trains, six in each direction, running in a 150mile corridor over an eight hour time window is provided below.

FIG. 13 shows the string graph for the initial unprocessed schedule(i.e., train departure times were chosen without regard to feasibility),and Table 1 below shows the information concerning each train. There aretwelve trains on the corridor and the time frame of interest is eighthours (12:00 to 20:00). The columns of the table indicate:

(1) the train identification number (shown in the string graph as aninteger at the center of each associated string)

(2) direction of travel (Direction),

(3) earliest acceptable departure time (Min. Departure),

(4) actual departure time (Act. Departure),

(5) latest arrival time before penalty is incurred (Max. Arrival)

(6) initial speed (Speed),

(7) train length (Length),

(8) initial penalty incurred for being late (Penalty Step),

(9) per hour penalty for each hour late (Penalty Slope),

(10) maximum permitted speed (Max. Speed).

TABLE 1 Initial Train Schedule, before Gradient Search Train Min. Act.ID Direction Departure Departure Max. Arrival Speed (mph) Length (mi.)Penalty Step Penalty Slope Max. Speed 1 west  6:45  7:30 17:45 20.0 1.11.000 0.450 40.0 2 west  8:30  9:15 19:45 20.0 1.2 1.500 0.150 35.0 3west 11:00 11:20 21:30 20.0 1.4 1.000 0.300 45.0 4 west 13:00 13:1523:30 20.0 1.0 0.000 0.000 50.0 5 west 14:30 14:50 25:00 20.0 1.4 2.0000.200 40.0 6 west 16.00 16:20 26:30 20.0 1.1 1.500 0.000 40.0 7 east 7:00  7:20 18:00 20.0 0.9 2.500 1.000 35.0 8 east  9:00  9:30 19:4520.0 1.1 1.500 0.300 50.0 9 east 11:00 11:30 21:30 20.0 1.3 0.000 0.00035.0 10  east 13:30 13:40 24:00 20.0 1.1 0.000 0.500 40.0 11  east 15:0015:15 26:00 20.0 1.1 1.500 0.250 40.0 12  east 17:00 17:15 27:00 20.01.0 0.000 0.000 40.0

The gradient search as discussed above was initiated with departuretimes being varied and train speeds held constant, and with the costfunction including the penalties for early departure and economicpenalties (i.e., late arrival). The resulting string graph is shown inFIG. 14.

Comparing FIG. 14 with FIG. 13, it can be seen that of the initial 31points of intersection of train trajectories, in FIG. 13, nine wereclose to feasible, where we will define “close” rather arbitrarily interms of the intersection dots at least touching a siding 20. Thus 23intersection points were not close to feasible. In the final version ofFIG. 14 some intersection points have disappeared, primarily becausetrains four and five have joined together in a convoy (identified inFIG. 14 by the number 5 on the coincident strings), and some trains havebeen pushed off the string graph. In FIG. 14, there are only twointersection points not meeting the definition of close.

Table 2 below shows the final schedule, which resembles the originalschedule except for the actual departure times of trains. Note that alltrains require 7.5 hours from actual departure until arrival at thedestination, so only train six is late, but train six is in fact onlyfour minutes late.

TABLE 2 Train Schedule after Gradient Search Train Min. Act. IDDirection Departure Departure Max. Arrival Speed (mph) Length (mi.)Penalty Step Penalty Slope Max. Speed 1 west  6:45  6:50 17:45 20.0 1.11.000 0.450 40.0 2 west  8:30  9:17 19:45 20.0 1.2 1.500 0.150 35.0 3west 11:00 11:41 21:30 20.0 1.4 1.000 0.300 45.0 4 west 13:00 14:1023:30 20.0 1.0 0.000 0.000 50.0 5 west 14:30 16:37 25:00 20.0 1.4 2.0000.200 40.0 6 west 16:00 19:04 26:30 20.0 1.1 1.500 0.000 40.0 7 east 7:00  7:40 18:00 20.0 0.9 2.500 1.000 35.0 8 east  9:00 10:03 19:4520.0 1.1 1.500 0.300 50.0 9 east 11:00 12:29 21:30 20.0 1.3 0.000 0.00035.0 10  east 13:30 14:59 24:00 20.0 1.1 0.000 0.500 40.0 11  east 15:0017:20 26:00 20.0 1.1 1.500 0.250 40.0 12  east 17:00 19:48 27:00 20.01.0 0.000 0.000 40.0

Improving the Gradient Search Result by Speed Adjustments

In this embodiment the gradient search result is modified by adjustingtrain speeds between sidings to achieve better siding meets. Thegradient search process brought train intersections near, but may nothave brought them exactly to the center points of sidings. Thisembodiment includes a technique for accounting for actual siding delaysby changing intersiding speeds of trains as necessary to preserve thepositions of intersection points at sidings. In order to provide astandard basis for that process, in this embodiment we will first adjustthe results of the gradient search so that the intersection points oftrain trajectories have y-coordinates precisely at the centerpoints ofsidings. The intersection points must be moved in order of increasingtime coordinate, to assure that all prior intersection points havealready been appropriately adjusted.

To center intersection points at sidings and side specific trains, thetrain speeds of the trains involved must be modified somewhat. Ofcourse, modifying a train's speed at any point could affect itstrajectory downline, which would move the positions of its future meetswith other trains. This is avoided by requiring that the centeredintersection points remain fixed, and that train speeds be varied asnecessary to meet that requirement. More specifically, the train thatwill not be sided at a given intersection point will be constrained topass through the centered intersection point, and the train that will besided will undergo speed adjustments as needed to arrive and side beforethe opposed train is within an interfering (i.e., minimum stoppingdistance) of the siding train.

The intersection points are processed in of increasing time order, sothat all downline adjustments of trajectories may account for earliermodifications. As each intersection point is processed, the decision asto which train to side may depend on various criteria, which can beestablished as special rules auxiliary to the overall algorithm. Forexample, if only one of the two trains is too long for the siding, thenthe other train must be sided. Another special case would be invoked fora train which could not restart if it sided on an upgrade of thecorridor (that is, it could not generate sufficient tractive effort tomove uphill).

If there are no special circumstances dictating that one of the twotrains should side, then the criteria for deciding the train to side isthat of train speed: in effect, siding a train requires that it arrive“early” at the siding, relative to the centered intersection point, sothat it can slow down and pull into the siding without interference fromthe opposed train. Arriving early implies that the train must obtain aspeed greater than that which was nominally assigned by thegradient-search process of the present invention, and there is ofcourse, some practical upper limit on train speed, as will be discussedbelow. The siding decision must be made based on which of the two trainswill be driven less far toward its upper limit, given that it must besided. Once the decision is made, the speed and arrival times of bothtrains are fitted to the actual requirement of siding the train.

FIG. 15 shows such a situation, where the intersection point (x_(ij),y_(ij)) of trains T_(i) and T_(j) is to be moved to the center of sidingS_(h) (designated by point (x_(ij), (a_(h)+b_(h))/2)), given that theimmediately prior intersection points affecting trains T_(i) and T_(j)have already been adjusted. Clearly the speeds needed for train T_(i)(from S_(h−1) to S_(h)) and for T_(j) (from S_(h+1) to S_(h)) are givenby $\begin{matrix}{{s_{i,{h - 1}} = \frac{c_{h} - c_{h - 1}}{x_{ij} - x_{ik}}}{and}} & \text{(10-2)} \\{{s_{jh} = \frac{c_{h + 1} - c_{h}}{x_{ij} - x_{jp}}}{where}} & \text{(10-3)} \\{{c_{h} = {{\frac{b_{h} - a_{h}}{2}\quad {for}\quad h} = 1}},\ldots \quad,n_{s},} & \quad\end{matrix}$

and trains T_(k), T_(p) are the trains representing the immediatelyprevious meets of with trains T_(i) and T_(j), respectively.

There is also the case where there is no prior point of intersection,i.e., where the intersection point (x_(ij), y_(ij)) is the firstintersection point for either or both of T_(i) or T_(j), as shown inFIG. 16. In this case, the speed needed to assure intersection at thesiding center is given by $\begin{matrix}{{s_{i,{h - 1}} = {\frac{c_{h}}{x_{ij} - d_{i}}\quad {for}\quad T_{i}\quad {eastbound}}}{and}} & \text{(10-4)} \\{s_{ih} = {\frac{L - c_{h}}{x_{ij} - d_{i}}\quad {for}\quad T_{i}\quad {westbound}}} & \text{(10-5)}\end{matrix}$

FIG. 17 illustrates the result of centering all meets for the gradientsearch results shown in FIG. 14, on sidings 181 through 188 by adjustingtrain speeds between sidings. In effect, rather minor speed adjustmentsare usually sufficient to center all meets.

Resolving Siding Conflicts

There is one possible undesirable side-effect that may arise whencentering meets or passes, as illustrated in FIGS. 18A and 18B. Afterexecuting the gradient search process, the initial intersection pointsare shown in FIG. 18A. Train T₁ intersects train T₃ at point 180, trainT₁ intersects train TA at point 181 and train T₂ intersects train T₄ atpoint 182. The result of centering all the meets represented by points180, 181, and 182, by speed adjustments as discussed above, is shown inFIG. 18B. Train T₁ is sided on siding S_(n+1) at point 183 because ofits meet with train T₃, and train T₄ is sided at siding S_(n+1) at point184 because of its meet with train T₂.

The difficulty created is that trains T₁ and T₄ must both be sided onthe same siding S_(n+1), although they are traveling in oppositedirections, because one train is waiting on the siding that the othertrain must occupy before the former train pulls out. This cannot beaccomplished, so the result of centering all of the meets will in a caselike this be an infeasible schedule. We will denote these artifacts assiding conflicts.

The meet-centering process can produce two types of siding conflicts, asshown in FIG. 19A and 19B. FIG. 19A repeats the siding problemillustrated in FIG. 18B. FIG. 19B illustrates another siding conflictsituation, but as in FIGS. 18B and 19A, the problem is again that twotrains traveling in opposite directions must be sided on the samesiding. Trains T₂ and T₃ intersect at point 194, with the former sided,while trains T₁ and T₄ intersect at point 196, with the former sided.Both of the siding conflict types shown in FIGS. 19A and 19B can beresolved by moving the meet of the conflicting trains to an adjacentsiding, as shown in FIGS. 20A and 20B.

FIG. 20A represents a siding conflict identical to FIG. 19A. Theconflict at the meet point 200 is resolved by moving it upward to point201 in FIG. 20B. This is accomplished by accelerating or deceleratingthe necessary trains between adjacent sidings. Similarly, the sidingconflict of FIG. 19B can be resolved by moving it downward.

This process of resolution as illustrated by FIG. 20B (that is, theupward and downward movement of meets to resolve siding conflicts) willwork if the trains in conflict have at most one meet at the siding towhich their meet is moved, but will not work if both trains have meetsat the siding to which their meet is moved, as shown in FIGS. 21A and21B. In that case, the resolution of the original siding conflict atpoint a 210 in FIG. 21A by moving it to point 211 in FIG. 21B, simplycreates yet another siding conflict.

However, there is an inductive way to resolve all siding conflicts whichmight occur from the meet centering process: if we call the sidingconflict of FIGS. 18B and 19A an upward-resolvable conflict, and thesiding conflict of FIG. 19B a downward-resolvable conflict, it followsthat any siding conflict occurring on siding S₁ is in fact resolvable,because the conflict point may be pushed to the end of the corridor,where any meets with the two trains involved can be avoided by slightlymodifying the departure/arrival times of the involved trains asnecessary.

This is illustrated in FIGS. 22A-D, where the illustrations on the rightprovide resolutions of the siding conflicts on the left. Theintersection at point 220 in FIG. 22A is moved to point 221 in FIG. 22B,by reducing the speed of train T₁. In FIG. 22C, the siding conflict atpoint 224 is removed by moving the intersection of point of trains T₁and T₂ to point 225. Now feasible sidings can occur at intersectionpoints 225 and 226.

Now we may proceed by induction to show that all siding conflicts areresolvable, with the basis being provided by the techniques demonstratedin FIG. 22, and with the inductive assumption being that all sidingconflicts occurring on siding S_(n−1), for n≧2, can be resolved bypushing the conflict point to the end of the corridor.

FIGS. 23A through 23E illustrate a downward-resolvable siding conflicton siding S_(n), and it is shown that for all possible variations ofthat conflict, it can be resolved to a situation where, at worst, itresults in a new siding conflict resulting on siding S_(n−1). By ourinductive assumption, any such induced siding conflicts can be resolved.FIG. 23A shows the original meet situation. FIG. 23B (case 1) shows theresolution if trains T₁ and T₂ have no meets at points d and f. FIG. 23C(case 2a) shows the resolution when train T₁ has a meet at point d,train T₂ has no meet at point f, and train T₅ is not sided. FIG. 23D(case 2b)) shows the resolution when train T₁ has a meet at point d,train T₂ has no meet at point f, and train T₅ is sided. The resolutionof case 3 (not shown) where train T₁ has no meet at point d, train T₂has a meet at point f, is identical to case 2a and 2b. Finally, case 4is illustrated in FIG. 23E where trains T₁ and T₂ both have meets onsiding S_(n−1).

FIG. 24 shows a similar demonstration for an upward-resolvable sidingconflict on S_(n), except the illustration is limited to a worst case,with it being evident that cases with fewer constraining meets are alsoresolvable to, at worst, siding conflicts on S_(n−1). FIG. 24Aillustrates the original meet situation with the modificationaccomplished by moving the meet at point c to point g, as illustrated inFIG. 24B.

We conclude, finally, that although the meet centering process canproduce infeasible string graphs because of the siding conflicts, allsuch siding conflicts can be resolved to feasible situations which donot include siding conflicts. When moving a meet point from one sidingto the next lower one, there will usually be some horizontal latitude asto where to place it, and so to some degree, train speed limits can befavored. Note, however, that the resolution of these conflicts mayresult in some occasions where trains must travel at unrealizablespeeds. This will be dealt with by introducing a new gradientoptimization process in another embodiment of the present inventionbelow.

Accounting for Siding Time

As described to this point, the invention permits an initial schedule oftrains on the corridor, arranged without regard for meets and passes, tobe moved toward a schedule which minimizes or eliminates meets or passesoccurring at infeasible locations, i.e., not at sidings.

After the processes of improving the gradient search results by speedadjustments and resolving siding conflicts have been applied, asdiscussed above, to the original gradient search result, there has beencreated a string graph in which each train trajectory is depicted as asequence of straight line segments, constrained to meet other traintrajectories at the centerpoints of sidings. The string graph, adjustedafter the gradient search as necessary to move all meets to centerpointsof sidings, will be called the incomplete string graph.

The gradient search and the speed adjustments produce a meet of twotrains at a siding, but in one embodiment it does not actually accountfor the need for one train to side, or for the fact that the train has alength. To actually side one train, it must arrive at the siding farenough in advance of the other train to completely pull into the siding,and it must delay its departure until the other train is clear of thesiding.

FIG. 25 illustrates this problem. To this point, a train trajectory hasbeen approximated as a single unbroken line segment (as in FIG. 2), inactuality, it will take the form of a broken line segment if thecorresponding train must be sided. In FIG. 25, the trains T₂ and T₃ mustside, so the corresponding trajectories L₂ and L₃ reflect the requiredsiding time with horizontal line segments 250 and 252 inserted into thetrajectories. The minimum length of the horizontal segment is determinedby the length and speed of the opposed train. Therefore the level ofresolution into train trajectory planning must be improved in thisembodiment to obtain an implementable train schedule, based on theresults of the gradient search. It is necessary to develop themathematics of siding trains, given that an initial schedule has beenobtained using the gradient search process, above.

Defining the Train Trajectory Vector Implicit in the purely geometricformat described to this point, are the numerical quantities needed todefine the train trajectory vector of Equation 10-1. Specifically, fortrain T_(i), the value of b_(i0) (T₁ eastbound) or of b_(i,n) _(S+1)(T_(i) westbound) must be equal to the departure time d_(i) of thetrain, which was determined by the gradient search process, withpossible modification by the resolution of siding conflicts. Now for aneastbound train, assume that the first meet with another train occurswith train T_(j) at siding S_(h), h>0, thus we specifically know thatT_(i) must be at point (x_(ij), c_(h)) on the string graph, as shown inFIG. 26. Then the speed s_(ih) of train T_(i), from its origin, must be$\begin{matrix}{{s_{ih} = \frac{c_{h}}{x_{ij} - b_{i0}}},} & \text{(10-6)}\end{matrix}$

and it follows that b_(ik), for k=1, . . . , h, and e_(ik), for k=1, . .. h−1, may be determined as follows. $\begin{matrix}{{b_{ik} = {b_{i0} + \frac{a_{k}}{s_{ih}}}},{{{for}\quad k} = 1},\ldots \quad,h,{and}} & \text{(10-7)} \\{{e_{ik} = {{b_{i0} + {\frac{b_{k}}{s_{ij}}\quad {for}\quad k}} = 1}},\ldots \quad,{h - 1.}} & \text{(10-8)}\end{matrix}$

We can now proceed on the next line segment (i.e., from meet to meet)defining the trajectory of T_(i) to obtain a speed, determined by theintersections of T_(i) with other trains, from which we can determinethe times of arrival of T_(i) at all intermediate siding edges, therebyfilling in all of the data required for the train trajectory vector ofT_(i) except the siding decision values B_(ih). Siding decisions havenot yet been considered, so these values will be defined later.

It should be clear that an analogous process can be defined forwestbound trains, so we have inductively defined all train trajectoryvectors using the incomplete string graph.

Extending the Definition of the Train Trajectory

The definition of train trajectories as equations relating distancealong the corridor to time, as given by Equation 3-3, does notaccommodate the siding time and siding decisions required for sometrains. Instead, it provided a characterization of trajectories asstraight line segments, for the purpose of minimizing the computationsneeded for the gradient search process. In order to generalize thetrajectory, in this embodiment the simple definition of a trajectorywill be modified by adding parameters accounting for train delays atsidings.

Where a corridor has ns sidings, we begin by defining the traintrajectory vector, and for notational convenience, we will designate thewest end of the corridor as siding S₀, and the east end of the corridoras siding S_(n) _(S) ₊₁, with the recognition that these “sidings” havea length of zero. Given this convention, define the train trajectoryvector for train T_(i) as

{right arrow over (μ)}_(i)=(θ_(i),b_(i0),b_(i1), . . . , b_(i,n) _(s)₊₁,e_(i1),e_(i2), . . . , e_(in) _(s) B_(i1), . . . , B_(in) _(s)),  (10-1)

where

θ_(i)=the direction of train T_(i) (already defined in Equation 3-4),

b_(ih)=the time at which train T_(i) reaches siding S_(h) (h=0, . . .,n_(S+1)),

e_(ih)=the time at which train T_(i) departs the siding S_(h) (h=1, . .. , n_(S)), $B_{ih} = \left\{ \begin{matrix}1 & {{if}\quad T_{i}\quad {is}\quad {sided}\quad {on}\quad S_{h}} \\0 & {{if}\quad T_{i}\quad {is}\quad {not}\quad {sided}\quad {on}\quad S_{h}}\end{matrix} \right.$

The times at which a train reaches or departs from a siding will be thetime at which the head of the train reaches the upstream or downstream(“downstream” or “upstream” is defined relative to the direction of thetrain) end of the siding, respectively. Also for consistency, sincesiding S_(i) has endpoints a₁ and b₁, as measured from the west end ofthe corridor, let b₀ denote the beginning of the corridor, and a_(n)_(S) ₊₁ denote the end of the corridor.

Detailing the Siding Process

FIG. 14 demonstrated the result of the gradient search process, anddemonstrates that the search process has the capability to adjustdeparture times so that train trajectories intersect at sidings. Thegradient search process cannot usually perfectly align all meets atsidings, and so the meet-centering process was also described above.Once we have in fact placed all meets at sidings, we might use trainspeed adjustments to interpret the resulting string graph as showingthat the engines of trains pass exactly at the centerpoints of sidings.

Now the focus will be on a technique by which a string graph such asthat in FIG. 14, with meets centered on sidings, as discussed above, canbe modified further to provide a full, feasible string graph schedulewith trains sided as necessary. We will assume that we begin with alltrain meets centered at sidings, and all possible siding conflictsresolved as necessary. The process will be inductive: we will begin byordering the collection of all intersection points on the incompletestring graph according to the time of intersection, and we will proceedto modify them, in time order, so that each intersection point reflectsa feasible siding arrangement.

FIG. 27 illustrates the technique to be applied, as it is applied tointersection point y₂₄. It is assumed that all intersection points ofthe string graph prior in time to y₂₄ have already been modified by thisprocess, so that the required time and speed data concerning trains T₂and T₄, prior to point y₂₄ are in fact valid. Of the two trajectoriespassing though y₂₄, we will choose to side train T₄, and themodification of trajectory for T₄ is indicated by the dashed sequence ofline segments. Effectively, we require that T₄ operate at a higher speedfrom the last intersection point on the trajectory (relative to theincomplete string graph) in order to arrive at siding S_(n), so that thelast car of T₄ actually enters the siding before the engine of train T₂arrives at the west end of siding S_(n).

FIGS. 28 and 29 represent possible meet/pass situations between trains.There are four basic cases, as follows:

(1) an eastbound train sides for a westbound train,

(2) a westbound train sides for an eastbound train,

(3) an eastbound train sides for a passing eastbound train,

(4) a westbound train sides for a passing westbound train.

There are also four variants on each case (for a total of 16 cases),depending on whether either or both of the trains involved were sided atthe previous intersection point on their trajectories. This hassignificance because a train leaving a siding will have a lower initialspeed (the pullout speed from the siding) across an intersiding segmentthan a train which has not been sided.

Essential parameters for the process will be defined in conjunction withFIGS. 28 and 29. Relative to any train T_(i), let

A_(ih)=the arrival time of the last car of T_(i) at the upstream end ofthe siding S_(h),

D_(ih)=the time at which the head of T_(i) arrives at the downstreamedge of siding S_(h),

t_(ih)=the time at which a train T_(i) not sided at S_(h) passes themidpoint of the siding S_(h),

ν_(h)=the pullin/pullout speed of any train for siding S_(h),

p(i,h)=the siding at which T_(i) had the most recent meet before thepresent meet at S_(h).

f_(i)(ν)=the minimum stopping time for train T_(i) at speed ν. Theapproximation used for this function is explained in Appendix B.

Although the following notation is not new, we review it here forconvenience: let

a_(h)=the coordinate of the western end of siding S_(h),

b_(h)=the coordinate of the eastern end of siding S_(h),

M_(i)=the length of train T_(i),

L=the length of the corridor (with the western end being the origin),and finally, let $\begin{matrix}{{c_{h} = \frac{a_{h} + b_{h}}{2}},\quad {{the}\quad {coordinate}\quad {of}\quad {the}\quad {midpoint}\quad {of}\quad {siding}\quad {S_{h}.}}} & \text{(10-9)}\end{matrix}$

Relative to the earlier descriptors of the train trajector vector fortrain T_(i) (Equation 10-1), note that

D_(ih)=e_(ih),  (10-10)

and, for an unsided train passing siding S_(h), assumed to maintainconstant speed across the extent of the siding, $\begin{matrix}{{t_{ih} = \frac{b_{ij} + e_{ih}}{2}},} & \text{(10-11)}\end{matrix}$

the value of which was established by centering all meets at sidings.

In the following derivations, the trains meeting at a siding S_(h) willbe trains T_(i) and T_(j), and T_(i) will always be the train to besided. The apparent constraints that must be met for T_(i) to be sided(see FIGS. 28 and 29), are

A_(ih)≦D_(jh),  (10-12)

and

D_(ih)≦A_(jh).  (10-13)

These two constraints are somewhat idealized, and both needmodifications. First, it would be unsafe to apply inequality 10-12literally, because if, for any reason, train T_(i) were to stop short ofbeing fully sided, then train T_(j) might in fact be too close to stopin time to avoid a collision. Thus condition 10-12 should be replacedwith

A _(ih) ≦D _(jh) −f _(j)(ν_(j)).  (10-14)

where ν_(j) is the speed of T_(j) as it approaches siding S_(h).

Condition 10-13 also requires a modification, because it could be thecase that T_(i) could actually clear the downstream end of the siding(relative to T_(i)) before T_(i) could get there, even if T_(i) pulledinto the siding, continued moving at maximum siding speed, and arrivedat the downstream end of the siding. In that case, D_(ih) is limited bythe speed of T_(i), not the position of T_(j), and takes the minimumvalue $\begin{matrix}{{D_{ih} = {A_{ih} + \frac{b_{h} - a_{h} - M_{i}}{v_{h}}}},} & \text{(10-15)}\end{matrix}$

so the corrected version of Condition 10-14 is $\begin{matrix}{D_{ih} = {\max \quad {\left\{ {A_{jh},{A_{ih} + \frac{b_{h} - a_{h} - M_{i}}{v_{h}}}} \right\}.}}} & \text{(10-16)}\end{matrix}$

Constraints 10-14 and 10-16 then provide the practical constraints bywhich meets and passes can be planned.

The quantities in the inequalities are functions of the train speeds onthe previous intersiding segments and of the departure times from thelast siding: inductively, we assume that the departure times for bothtrains from their previous meets are known, and we must derive thespeeds needed by both trains to arrive at the siding S_(h) so thatconstraints 10-14 and 10-16 are met. The known quantities, for thetrains T_(i) and T_(j), at the beginning of the inductive step, are

(1) t_(jh), the time at which T_(j) should be at the center of S_(h)(Equation 10-11),

(2) D_(i,p(i,j)), for T_(i),

(3) D_(j,p(i,h)), for T_(j).

To satisfy constraints 10-14 and 10-16, we must determine values forD_(ih), D_(jh), A_(ih), and A_(jh), in terms of speeds, and then solvethe constraint inequalities for the speeds required to meet theconstraints.

The speeds so obtained are for T_(i) and T_(j) from their last meets totheir common meet, and when we solve the constraint inequalities(subject to the siding choices made) to obtain these train speeds, wewill also determine the values corresponding to items (1)-(3) above fortrains T_(i) and T_(j) at siding S_(h), thereby completing the inductiveprocess. The basis of the induction will be taken up later.

The Inductive Step for the Unsided Train

We first determine the speeds, from the requirements that the unsidedtrain pass the center of siding S_(h) at time t_(jh): $\begin{matrix}{t_{jh} = \left\{ {\begin{matrix}{D_{j,{p{({j,h})}}} + \frac{c_{h} - b_{p{({j,h})}}}{s_{j,{h - 1}}}} & {{{for}\quad T_{j}\quad {eastbound}},{{and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({j,h})}}}} \\{D_{j,{p{({j,h})}}} + \frac{M_{j}}{v_{p{({j,h})}}} + \frac{c_{h} - b_{p{({j,h})}} - M_{j}}{s_{j,{h - 1}}}} & {{{for}\quad T_{j}\quad {eastbound}},{{and}\quad {sided}\quad {at}\quad S_{p{({j,h})}}}} \\{D_{j,{p{({j,h})}}} + \frac{a_{p{({j,h})}} - c_{h}}{s_{j,h}}} & {{for}\quad T_{j}\quad {westbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({j,h})}}} \\{D_{j,{p{({j,h})}}} + \frac{M_{j}}{v_{p{({j,h})}}} + \frac{a_{p{({j,h})}} - c_{h} - M_{j}}{s_{jh}}} & {{for}\quad T_{j}\quad {westbound}\quad {and}\quad {sided}\quad {at}\quad S_{h + 1}}\end{matrix}.} \right.} & \text{(10-17)}\end{matrix}$

Note that there are also two special cases of Equations 10-17, namely

t_(j0)=d_(j) for T_(j) eastbound,

t_(j,n) _(S) ₊₁=d_(j)+for T_(j) westbound  (10-18)

and for notational consistency, we define

c₀=0,

and

c_(n) _(S) ₊₁=L.  (10-19)

Additionally, the validity of equation 10-17 requires that the distancebetween sidings S_(h) and S_(p(j,h)) exceed the length M_(j) of trainT_(j). From Equations 10-17, we may solve for the speeds required:$\begin{matrix}{{s_{j,{h - 1}} = \frac{c_{h} - b_{p{({j,h})}}}{t_{jh} - D_{j,{p{({j,h})}}}}},{{{for}\quad T_{j}\quad {eastbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({j,h})}}};}} & \text{(10-20)} \\{{s_{j,{h - 1}} = \frac{c_{h} - b_{p{({j,h})}} - M_{j}}{t_{jh} - D_{j,{p{({j,h})}}} - \frac{M_{j}}{v_{p{({j,h})}}}}},{{{for}\quad T_{j}\quad {eastbound}\quad {and}\quad {sided}\quad {at}\quad S_{p{({j,h})}}};}} & \text{(10-21)} \\{{s_{jh} = \frac{a_{p{({j,h})}} - c_{h}}{t_{jh} - D_{j,{p{({j,h})}}}}},{{{for}\quad T_{j}\quad {westbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({j,h})}}};}} & \text{(10-22)} \\{{s_{jh} = \frac{a_{p{({j,h})}} - c_{h} - M_{j}}{t_{jh} - D_{j,{p{({j,h})}}} - \frac{M_{j}}{v_{p{({j,h})}}}}},{{for}\quad T_{j}\quad {westbound}\quad {and}\quad {sided}\quad {at}\quad {S_{p{({j,h})}}.}}} & \text{(10-23)}\end{matrix}$

Now that the speed for the unsided train is determined, we may solve forD_(jh) and A_(jh), as follows: $\begin{matrix}{D_{jh} = \left\{ {\begin{matrix}{t_{jh} + {\frac{b_{h} - c_{h}}{s_{j,{h - 1}}}\quad {for}\quad T_{j}\quad {eastbound}}} \\{t_{jh} + {\frac{c_{h} - a_{h}}{s_{jh}}\quad {for}\quad T_{j}\quad {westbound}}}\end{matrix};} \right.} & \text{(10-24)} \\{A_{jh} = \left\{ {\begin{matrix}{t_{jh} - {\frac{c_{h} - a_{h} + M_{j}}{s_{j,{h - 1}}}\quad {for}\quad T_{j}\quad {eastbound}}} \\{t_{jh} - {\frac{b_{h} - c_{h} + M_{j}}{s_{jh}}\quad {for}\quad T_{j}\quad {westbound}}}\end{matrix}.} \right.} & \text{(10-25)}\end{matrix}$

For the unsided train, the determination of D_(jh) in Equation 10-24completes the inductive step of the siding algorithm. Note that if thereare sidings between S_(h) and S_(p(j,h)), then the times of arrival anddeparture from those sidings is implicit in the speeds calculated inEquations 10-20 through 10-23. For k an index of such a siding, we havethe following results: $\begin{matrix}{b_{jk} = \left\{ {\begin{matrix}{e_{j,{p{({j,h})}}} + \frac{a_{k} - b_{p{({j,h})}}}{s_{j,{h - 1}}}} & {{for}\quad T_{j}\quad {eastbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({j,h})}}} \\{e_{j,{p{({j,h})}}} + \frac{M_{j}}{v_{p{({j,h})}}} + \frac{a_{k} - b_{p{({j,h})}} - M_{j}}{s_{j,{h - 1}}}} & {{for}\quad T_{j}\quad {eastbound}\quad {and}\quad {sided}\quad {at}\quad S_{p{({j,h})}}} \\{e_{j,{p{({j,h})}}} + \frac{a_{p{({j,h})}} - b_{k}}{s_{j,h}}} & {{for}\quad T_{j}\quad {westbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({j,h})}}} \\{e_{j,{p{({j,h})}}} + \frac{M_{j}}{v_{p{({j,h})}}} + \frac{a_{p{({j,h})}} - b_{k} - M_{j}}{s_{j,h}}} & {{for}\quad T_{j}\quad {westbound}\quad {and}\quad {sided}\quad {at}\quad S_{p{({j,h})}}}\end{matrix}.} \right.} & \text{(10-26)}\end{matrix}$

We may then write $\begin{matrix}{e_{jk} = \left\{ {\begin{matrix}{b_{jk} + {\frac{b_{k} - a_{k}}{s_{k,{h - 1}}}\quad {for}\quad T_{j}\quad {eastbound}}} \\{b_{jk} + {\frac{b_{k} - a_{k}}{s_{kh}}\quad {for}\quad T_{j}\quad {westbound}}}\end{matrix}.} \right.} & \text{(10-27)}\end{matrix}$

The Inductive Step for the Sided Train

Half of the inductive step for the sided train T_(j) is alreadycomplete, in that we can set the value D_(ih) to be any value satisfyingcondition 10-16, although we would normally set that value to be assmall as possible. However, we must also determine the speed required byT_(i), from the previous siding S_(p(i,h)) where T_(i) had a meet toS_(h), that will satisfy Condition 10-14. There are four cases, based onwhether T_(i) is eastbound or westbound, and did or did not side atS_(p(i, h)). We express A_(ih) for each of these cases, and then useCondition 10-14 to determine a minimum speed for T_(i).$A_{ih} = \left\{ \begin{matrix}{D_{i,{p{({i,h})}}} + \frac{a_{h} - b_{p{({i,h})}}}{s_{i,{h - 1}}} + \frac{M_{i}}{v_{h}}} & {{for}\quad T_{i}\quad {eastbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({i,h})}}} \\{D_{i,{p{({i,h})}}} + \frac{M_{i}}{v_{p{({i,h})}}} + \frac{a_{h} - b_{p{({i,h})}} - M_{i}}{s_{i,{h - 1}}} + \frac{M_{i}}{v_{h}}} & {{for}\quad T_{i}\quad {eastbound}\quad {and}\quad {sided}\quad {at}\quad S_{p{({i,h})}}} \\{D_{i,{p{({i,h})}}} + \frac{a_{p{({i,h})}} - b_{h}}{s_{ih}} + \frac{M_{i}}{v_{h}}} & {{for}\quad T_{i}\quad {westbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({i,h})}}} \\{D_{i,{p{({i,h})}}} + \frac{M_{i}}{v_{p{({i,h})}}} + \frac{a_{p{({i,h})}} - b_{h} - M_{i}}{s_{ih}} + \frac{M_{i}}{v_{h}}} & {{for}\quad T_{i}\quad {westbound}\quad {and}\quad {sided}\quad {at}\quad S_{p{({i,h})}}}\end{matrix} \right.$

Since the value of D_(jh) has been determined in the previous section,Equation 10-28 and Condition 10-12 lead to inequalities for the speeds_(ih) or s_(i,h−1) of T_(i), as follows. $\begin{matrix}{{s_{i,{h - 1}} \geq \frac{a_{h} - b_{p{({i,h})}}}{D_{j,h} - {f_{j}\left( v_{j} \right)} - D_{i,{p{({i,h})}}} - \frac{M_{i}}{v_{h}}}},{{for}\quad T_{i}\quad {eastbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({i,h})}}},} & \text{(10-29)}\end{matrix}$

$\begin{matrix}{{s_{i,{h - 1}} \geq \frac{a_{h} - b_{p{({i,h})}} - M_{i}}{D_{j,h} - {f_{j}\left( v_{j} \right)} - D_{i,{p{({i,h})}}} - \frac{M_{i}}{v_{p{({i,h})}}} - \frac{M_{i}}{v_{h}}}},{{for}\quad T_{i}\quad {eastbound}\quad {and}\quad {sided}\quad {at}\quad S_{p{({i,h})}}},} & \text{(10-30)}\end{matrix}$

$\begin{matrix}{{s_{ih} \geq \frac{a_{p{({i,h})}} - b_{h}}{D_{jh} - {f_{j}\left( v_{j} \right)} - D_{i,{p{({i,h})}}} - \frac{M_{i}}{v_{h}}}},{{for}\quad T_{i}\quad {westbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{p{({i,h})}}},} & \text{(10-31)}\end{matrix}$

$\begin{matrix}{{s_{ih} \geq \frac{a_{p{({i,h})}} - b_{h} - M_{i}}{D_{jh} - {f_{j}\left( v_{j} \right)} - D_{i,{p{({i,h})}}} - \frac{M_{i}}{v_{p{({i,h})}}} - \frac{M_{i}}{v_{h}}}},{{for}\quad T_{i}\quad {westbound}\quad {and}\quad {sided}\quad {at}\quad S_{p{({i,h})}}},} & \text{(10-32)}\end{matrix}$

where $\begin{matrix}{v_{j} = \left\{ {\begin{matrix}{s_{j,{h - 1}}\quad {for}\quad T_{j}\quad {eastbound}} \\{s_{{jh}\quad}\quad T_{j}\quad {westbound}}\end{matrix}.} \right.} & \text{(10-33)}\end{matrix}$

All of the quantities on the right sides of inequalities 10-29 through10-32 are known, so the speed s_(ih) or s_(i,h−1) for train T_(i) isdetermined, and the inductive step is complete. If a siding S_(k) isintermediate to S_(h) and S_(p(i,h)), then Equations 25 and 26 establishthe values of e_(ik) and b_(ik).

Establishing an inductive basis for the above depends only on theobservation that the very first meet for any train T_(i) or T_(j) ispreceded by the entry into the corridor from the east or west end. Allof the computations then required to arrive and meet at siding S_(h),subject to the constraints, are based on the original departure time ofthe relevant train, to which D_(p(i,h)) or D_(p(j,h)) is set equal, asthe case may be.

Finally, the inductive process defined above determines speeds, and thetimes of arrival and departure for each train at each siding, based onmeets at the sidings. Once a train has encountered its last meet, thefinal speed is adjusted to assure that it arrives at the end of thecorridor as scheduled. If train T_(i) has its last meet at siding S_(h),then the speeds between all subsequent sidings which are required toexit the corridor as scheduled are given by $\begin{matrix}{s_{i,h} = {s_{i,{h + 1}} = {\ldots = {s_{i,n_{s}} = \left\{ \begin{matrix}\frac{L - b_{h}}{b_{i,{n_{s} + 1}} - e_{ih}} & {{for}\quad T_{i}\quad {eastbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{h}} \\\frac{L - b_{h} - M_{i}}{b_{i,{n_{s} + 1}} - e_{ih} - \frac{M_{i}}{v_{h}}} & {{{for}{\quad \quad}T_{i}\quad {eastbound}{\quad \quad}{and}\quad {sided}{\quad \quad}{at}\quad S_{h}},}\end{matrix} \right.}}}} & \text{(10-34)}\end{matrix}$

and $\begin{matrix}{s_{i,{h - 1}} = {s_{i,{h - 2}} = {\ldots = {s_{i,1} = \left\{ \begin{matrix}\frac{a_{h}}{b_{i0} - e_{ih}} & {{for}\quad T_{i}\quad {westbound}\quad {and}\quad {not}\quad {sided}\quad {at}\quad S_{h}} \\\frac{a_{h} - M_{i}}{b_{i0} - e_{ih} - \frac{M_{i}}{v_{h}}} & {{for}{\quad \quad}T_{i}\quad {westbound}{\quad \quad}{and}\quad {sided}{\quad \quad}{at}\quad {S_{h}.}}\end{matrix} \right.}}}} & \text{(10-35)}\end{matrix}$

FIG. 30 displays a final and complete string graph which was has beenadjusted for centered meets, and then for train sidings.

FIG. 31 is a flow chart implementing one of the algorithms of thepresent invention. The flow chart of FIG. 31 can be processed on anyspecial purpose or general purpose computer. The software code necessaryto implement the FIG. 31 flow chart can be written by anyone who isskilled in the art of preparing software code, given the information inFIG. 31 and the description of the invention provided herein.

Processing begins at a step 310 where the initial conditions areestablished. That is, there is assumed an initial vector {right arrowover (y)}_(n), which identifies either the initial train speed or theinitial departure times of the trains on the corridor, or both. Thevector {right arrow over (y)}_(n) is used to calculate the intersectionpoints at a step 312 and then the value of the localizer function foreach calculated intersection point is determined at a step 314. At astep 316, the localizer function values are summed to create a schedulefeasibility cost function with an argument {right arrow over (y)}_(n).As discussed above, there are many different cost function typesassociated with different embodiments of the present invention. Forinstance, Equation 8-17 identifies two cost functions. The cost functionof schedule feasibility (C) and a cost function associated with earlydeparture effects (E). The economic cost function is defined in Equation8-26 and the maximum speed cost function is defined in Equation 7-9.Depending upon the embodiment of the present invention, one or more ofthese cost functions will be used to create the cost function at thestep 316.

At a step 318, the gradient of the cost function at {right arrow over(y)}_(n) is calculated. At a step 320, a new argument for the costfunction is created. This argument is referred to as {right arrow over(y)}_(n+1) and is calculated using the gradient value from step 318 anda predetermined step size. This step size is based on the gradient valueand must be determined in each situation so as to converge toward thefunction minimum. Reference is made to the four step process outlined atEquation 8-3. At a step 322, the magnitude of the difference between thecost function at {right arrow over (y)}_(n) and {right arrow over(y)}_(n+1) is calculated. At a decision step 324, the results from thestep 322 are compared to a threshold. If the threshold is not exceeded,then the cost function minimum has been located and a schedule for thecorridor is produced. This is illustrated diagrammatically at a step325. If the threshold is exceeded, then further calculations can beperformed to find the cost function minimum. At this point, processingmoves to a step 326 where the previous value of {right arrow over(y)}_(n) is now set equal to the value of {right arrow over (y)}_(n+1)and processing returns to the step 312 where the intersection points areagain calculated. Processing then continues through the steps 314, 316,318, 320, and 322, followed by decision step 324 where the magnitude isagain compared to the threshold value.

As discussed above, there are additional refinements that can be madefrom the schedule produced at the step 325. These refinements representadditional embodiments of the invention and are discussed in detailabove. In flow chart form, they are presented in FIG. 32. In lieu ofprocessing proceeding to the step 325 in FIG. 31 when the thresholdvalue is not exceeded, processing can instead continue to a step 340illustrated in FIG. 32. Here, adjustments are made to intersiding trainspeeds so that the intersections will occur precisely at the sidings.This embodiment is discussed in conjunction with FIGS. 15, 16 and 17. Inanother embodiment, siding conflicts can be resolved at a step 342. Thisembodiment is discussed in conjunction with FIGS. 18-24 above. Thematter of accounting for the time the trains are sided is represented bya processing step 344. This embodiment is discussed above in conjunctionwith FIGS. 25-30. Finally, incorporation of these additional embodimentsprovide for the generation of another train schedule for the railcorridor, as illustrated at a step 346.

While I have shown and described embodiments in accordance with thepresent invention, it is understood that the same is not limited theretobut is susceptible of numerous changes and modifications as are known toa person skilled in the art. I, therefore, do not wish to be limited tothe details shown and described herein, but intend to cover all suchchanges and modifications as are obvious to one of ordinary skill in theart. $\begin{matrix}\text{Appendix A} \\\underset{\_}{\text{Properties of the Sigmoid and Localizer Functions.}}\end{matrix}$ $\begin{matrix}{\begin{matrix}{{{Lemma}\quad 1}:} & {{\sigma \left( {{x;\alpha},\beta} \right)} = {\beta - {\sigma \left( {{{- x};\alpha},\beta} \right)}}} \\{{Proof}:} & {{{\beta - {\sigma \left( {{{- x};\alpha},\beta} \right)}} = {{\beta \quad \left( {1 - \frac{1}{1 + e^{a\quad x}}} \right)} = {{\beta \quad \left( \frac{1 + e^{a\quad x} - 1}{1 + e^{a\quad x}} \right)} = {\frac{\beta}{1 + e^{{- a}\quad x}} = {\sigma \left( {{x;\alpha},\beta} \right)}}}}}\quad}\end{matrix}\quad {Q.E.D.}} & ({A1}) \\{{\begin{matrix}{{{Lemma}\quad 2}:} & {{\frac{\partial}{\partial x}\left( {\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)} \right)} = {\frac{a\quad \alpha}{\beta}{\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)}\left( {\beta - {\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)}} \right)}} \\{{Proof}:} & {{\frac{\partial}{\partial x}\left( {\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)} \right)} = {{\frac{\partial}{\partial x}\left( {\beta \left( {1 + e^{- {\alpha {({{a\quad x} + b})}}}} \right)}^{- 1} \right)} = {{\beta \left( {- 1} \right)}\left( {1 + e^{- {\alpha {({{a\quad x} + b})}}}} \right)^{- 2}\left( {{- a}\quad \alpha} \right)e^{- {\alpha {({{a\quad x} + b})}}}}}}\end{matrix}\quad = {{\frac{a\quad \alpha}{\beta}{\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)}\quad \left( \frac{\beta \quad e^{- {\alpha {({{a\quad x} + b})}}}}{1 + \quad e^{- {\alpha {({{a\quad x} + b})}}}} \right)} = {{\frac{a\quad \alpha}{\beta}{\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)}\quad \left( \frac{\beta \quad}{1 + \quad e^{\alpha {({{a\quad x} + b})}}} \right)}\quad = {{\frac{a\quad \alpha}{\beta}{\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)}{\sigma \left( {{{- \left( {{a\quad x} + b} \right)};\alpha},\beta} \right)}} = {\frac{a\quad \alpha}{\beta}{\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)}\left( {\beta - {\sigma \left( {{{{a\quad x} + b};\alpha},\beta} \right)}} \right)}}}}}\quad {Q.E.D.}} & ({A2})\end{matrix}$

The following result follows from the derivation of the localizerfunction in the body of this document, and from application of Lemma 2.

Lemma 3: Let (−∞,w),(a₁,b₁), . . . (a_(N),b_(N)),(e,∞) representmutually disjoint intervals, with −∞<a₁<b₁<a₂ . . . <a_(N)<b_(N)<∞. ThenL(x;α,β) defined to be low if and only if x is in or near one of theintervals (−∞,w),(a₁,b₁), . . . (a_(N),b_(N)),(e,∞) takes the form$\begin{matrix}{{{{L\left( {{x;\alpha},\beta} \right)} = {\beta - {\sum\limits_{i = 1}^{N}\quad \left\lbrack {{\sigma \left( {{{x - b_{i}};\alpha},\beta} \right)} - {\sigma \left( {{{x - a_{i}};\alpha},\beta} \right)}} \right\rbrack} - \quad {\sigma \left( {{w - x};\beta} \right)} - {\sigma \left( {{{x - e};\alpha},\beta} \right)}}},\quad {and}}\quad {{\frac{\partial}{\partial x}\left( {L\left( {{x;\alpha},\beta} \right)} \right)} = {\frac{\alpha}{\beta}\left\{ {{\sum\limits_{j = 1}^{N}\quad \left\lbrack {{{\sigma \left( {{{x - b_{j}};\alpha},\beta} \right)}\left( {\beta - {\sigma \left( {{{x - b_{j}};\alpha},\beta} \right)}} \right)} - \quad \quad {{\sigma \left( {{{x - a_{j}};\alpha},\beta} \right)}\left( {\beta - {\sigma \left( {{{x - a_{j}};\alpha},\beta} \right)}} \right)}} \right\rbrack} + {{\sigma \left( {{{w - x};\alpha},\beta} \right)}\quad \left( {\beta - {\sigma \left( {{{w - x};\alpha},\beta} \right)}} \right)} - \quad {{\sigma \left( {{{x - e};\alpha},\beta} \right)}\left( {\beta - {\sigma \left( {{{x - e};\alpha},\beta} \right)}} \right)}} \right\}}}} & ({A3})\end{matrix}$

Appendix B A Train Stopping Time Approximation

The basic formula for acceleration/deceleration of a body is

F=MA,  (B1)

where

F=the braking force applied,

M=the mass of the body,

A=the acceleration of the body.

A train has brakes on every car, and each car has mass, so we willassume that the total maximum braking force and mass are proportional tothe length of the train. Therefore Equation B1 may be written as

A=k,  (B2),

i.e., the deceleration available at maximum braking is (approximately)independent of the train's length or mass.

To evaluate k, we assume that a train moving 50 mph could stop in 1mile, therofer its average speed during (linear) deceleration would be25 mph, and the time required to reach a full stop would be

(1 mi./25 mph)(60 min/hr)=2.4 minutes.

Thus the equation relating train speed v to stopping time f(v) takes theform

f(ν)=ν/A=ν/k

and

2.4=50/k,  (B3)

therefore

k=50/2.4=20.83 (mph/min).

The final form is then

f(ν)=ν/20.83,  (B4)

where f(ν) is in minutes, and ν is in miles per hour.

Appendix C Variable Glossary

A_(i)(t)—the late penalty function assessed for train T_(i) (Equation7-1)

A_(ih)—the time of arrival of the end of train T_(i) at the upstreamedge of siding S_(h)

A({right arrow over (s)},{right arrow over (d)})—the cost functioncomponent forcing on-time arrivals

a_(h)—the distance from the west end of the corridor¹ at which sidingS_(h) begins

B_(ih)—the decision variable as to whether train T_(i) is sided atsiding S_(h)

b_(h)—the distance from the west end of the corridor at which sidingS_(i) ends (a_(i)<b_(i))

C({right arrow over (s)},{right arrow over (d)})—the cost functionforcing trajectory intersections at sidings

c_(h)—the midpoint of siding S_(h)

D_(ih)—the time of departure of train T_(i) from the downstream edge ofsiding S_(h)

d_(i)—the departure time of train T_(i)

{right arrow over (d)}—the vector of dimension n_(T) of departure timesfor all trains

E—the name of the point at the east end of the corridor

E({right arrow over (d)})—the cost function component preventing earlytrain departures

f_(i)(ν)—the minimum stopping time of train T_(i) at from speed ν

G({right arrow over (s)},{right arrow over (d)})—the total schedulingcost function (Equation 7-10)

H_(i)—the length of siding S_(i)

h_(i)—the step penalty cost incurred when train T_(i) arrives late

I—the set of all intersections of train trajectories (even if not on thestring graph)

L—the length of the corridor

L_(i)—the line on the string graph representing the trajectory of trainT_(i)

L(y)—the localizer function, with minima corresponding to each siding(Equation 5-5)

{tilde over (L)}(y)—the balanced localizer function (Equation 5-7)

L_(ij)(y_(ij))—the localizer modified so trains T_(i) and T_(j) won'tmeet where neither can side

M_(i)—the length of train T_(i)

m_(i)—the late penalty per time unit when train T_(i) arrives late

n_(s)—the number of sidings along the corridor

n_(T)—the number of trains involved in the optimization

p(i,h)—the siding prior to S_(h) at which train T_(i) had a meet,

S_(i)—the designator for the i-th siding, traveling eastward on thecorridor

s_(i)—the speed of train T_(i)

s_(i) ^((max))—maximum speed permitted for train T_(i)

s_(ih)—train T_(i)'s speed between the downstream edges of sidings S_(h)and S_(h+1)

{right arrow over (s)}—the vector of dimension n_(T) of speeds for alltrain

T_(i)—the designator for the i-th train

T_(ij)—the set of all sidings where at least one of trains T_(i) andT_(j) can side

t_(i)—the arrival time at which train T_(i) begins to incur latepenalties

t_(jh)—the time at which train T_(j), if not sided at S_(h), reachesc_(h).

t_(ij)—the time coordinate associated with trajectory intersectionpointy y_(ij)

V({right arrow over (s)})—the cost function component which limits trainspeeds

ν_(h)—the pullin/pullout speed for trains at siding S_(h)

W—the name of the point at the west end of the corridor (zero on thedistance axis)

y_(ij)—the distance from the west end of the corridor at which trainsT_(i) and T_(j) intersect

{right arrow over (y)}—the vector of all trajectory intersection pointsy_(ij)

α—the sigmoid function parameter controlling steepness of rise (Equation4-1)

β—the horizontal asymptote of the sigmoid function (Equation 4-1)

η₁—the weight applied to the feasibility component C({right arrow over(s)},{right arrow over (d)}) of the cost function

η₂—the weight applied to the late arrival component A({right arrow over(s)},{right arrow over (d)}) of the cost function

η₃—the weight applied to the early departure component E({right arrowover (d)}) of the cost function

η₄—the weight applied to the maximum speed component V({right arrow over(s)}) of the cost function

θ_(i)—a variable denoting the direction of train T_(i), 0 if eastbound,1 if westbound

σ(x) the sigmoid function (Equation 4-1)

What is claimed is:
 1. A method for scheduling the movement of aplurality of trains operating on a rail corridor to accommodate theintersection of trains traversing the rail corridor, whereby each trainhas at least one variable travel parameter, whereby the rail corridorincludes at least one main line and a plurality of secondary tracks ontowhich a train may be moved to avoid an intersection with another train,said method comprising the steps of: (a) deriving a localizer functionto represent the rail corridor, wherein said localizer function has avalue within a first range between secondary tracks and has a valuewithin a second range in the vicinity of each secondary track, whereinthe localizer function represents each secondary track as having equallength; (b) selecting a value for at least one travel parameter for eachof the plurality of trains; (c) finding the intersection points for theplurality of trains; (d) determining the value of said localizerfunction for each intersection point; (e) summing said localizerfunction values to create a schedule feasibility cost function sum,wherein said schedule feasibility cost function sum represents the costfunction associated with the intersection of trains at a secondarytrack; (f) changing one or more of the values selected in step (b) tofind the minimum of the cost function.
 2. The method of claim 1 whereinthe step (a) includes the steps of: (a1) computing the average length ofthe secondary tracks on the rail corridor; and (a2) redefining theboundaries of each secondary track as represented by the localizerfunction so that each secondary track has a length equal to the averagelength.
 3. The method of claim 1 wherein step (f) includes the steps of:(f1) incrementally increasing the length of each secondary track fromthe average value toward its actual value; and (f2) changing one or moreof the values selected in step (b) to find the minimum of the costfunction.
 4. The method of claim 1 wherein the travel parameter includestrain speed.
 5. The method of claim 4 including a step (g) adjustingtrain speeds between secondary tracks to ensure that each intersectionoccurs at a secondary track.
 6. The method of claim 4 including a step(g) modifying the intersiding speed of at least one of the plurality oftrains to account for the time a train spends on a secondary track. 7.The method of claim 1 wherein the travel parameter includes the entrytime of the train onto the rail corridor.
 8. The method of claim 1wherein the travel parameter includes train speed and the entry time ofthe train onto the rail corridor.
 9. The method of claim 1 wherein thesecondary track includes a passing siding.
 10. The method of claim 1wherein the secondary track includes two parallel tracks with crossoverswitches therebetween.
 11. The method of claim 1 wherein the localizerfunction is derived by summing a plurality of sigmoid functions, whereinsaid sigmoid functions are disposed with respect to each other and thelocation of the secondary tracks, such that the localizer function takeson a value in the first range between secondary tracks and has a valuein the second range in the vicinity of each secondary track.
 12. Anapparatus for scheduling the movement of a plurality of trains operatingon a rail corridor to accommodate the intersection of trains traversingthe rail corridor, whereby each train has at least one variable travelparameter, whereby the rail corridor includes at least one main line anda plurality of secondary tracks onto which a train may be moved to avoidan intersection with another train, said apparatus comprising: means forderiving a localizer function to represent the rail corridor, whereinsaid localizer function has a value within a first range betweensecondary tracks and has a value within a second range in the vicinityof each secondary track, wherein the localizer function represents eachsecondary track as having equal length; means for selecting a value forat least one travel parameter for each of the plurality of trains; meansfor finding the intersection points for the plurality of trains; meansfor determining the value of said localizer function for eachintersection point; means for summing said localizer function values tocreate a schedule feasibility cost function sum, wherein said schedulefeasibility cost function sum represents the cost function associatedwith the intersection of trains at a secondary track; means for changingone or more of the selected values to find the minimum of the costfunction.
 13. The apparatus of claim 12 wherein the means for derivingthe localizer function comprises: means for computing the average lengthof the secondary tracks on the rail corridor; and means for defining theboundaries of each secondary track as represented by the localizerfunction so that each secondary track has a length equal to the averagelength.
 14. The apparatus of claim 12 including means for incrementallyincreasing the length of each secondary track from the average valuetoward the actual secondary track length value.
 15. The apparatus ofclaim 12 wherein the travel parameter includes train speed.
 16. Theapparatus of claim 15 including means for adjusting train speeds betweensecondary tracks to ensure that each intersection occurs at a secondarytrack.
 17. The apparatus of claim 15 including means for modifying theintersiding speed of at least one of the plurality of trains to accountfor the time a train spends on a secondary track.
 18. The apparatus ofclaim 12 wherein the travel parameter includes the entry time of thetrain onto the rail corridor.
 19. The apparatus of claim 12 wherein thetravel parameter includes train speed and the entry time of the trainonto the rail corridor.
 20. The apparatus of claim 12 wherein thesecondary track includes a passing siding.
 21. The apparatus of claim 12wherein the secondary track includes two parallel tracks with crossoverswitches therebetween.
 22. The apparatus of claim 12 wherein thelocalizer function is derived by summing a plurality of sigmoidfunctions, wherein said sigmoid functions are disposed with respect toeach other and the location of the secondary tracks, such that thelocalizer function takes on a value within the first range betweensecondary tracks and takes on a value within the second range in thevicinity of each secondary track.